3 ms·
Not sure if its because I've been using React for the last 6 years and I've "fallen out of love" or it is actually starting to show its age but... React, which
by tantaman 6y ago
Not sure if its because I've been using React for the last 6 years and I've "fallen out of love" or it is actually starting to show its age but...
React, which was once the greatest thing to happen to UI frameworks, now looks like a very leaky abstraction.
The prevalence of `useMemo` and `useCallback` to get around perf issues,
`useEffect` to try to interact with event systems outside of React, and
`useRef` to save things that don't quite work when persisted in the component's state.
I'm watching Svelte with interest these days. It seems like we're ~1 year away from Svelte, or a framework very much like it (one that moves concerns into the compiler), taking off and revolutionizing things the way React did 7 years ago.
- cheez 6y agoInteresting, hadn't looked into Svelte. I do agree that something _like_ it can be useful in the future. I currently have my own framework that does this at compile time for non-UI code for performance reasons. Previously, Weblocks did something similar for Lisp IIRC.
- crubier 6y agoI disagree. So far NO other UI library/framework than react offered the “interface as a function of state” paradigm. All others (Svelte, Vue partially) are based on templates with their ad-hoc syntax for ifs and maps/loops and so on. This is a non starter for me. I will consider other things than react, as long as they use this concept of interface as a function of state. This is non negociable for me at this point.
- dbbk 6y agoCan you clarify what you mean by "interface as a function of state"? All the templated-frameworks still fit this definition... they are reactive to the state of your component. In fact, they are more performant than React because their template syntax provides static analysis, so the app can be optimised at compile time.
- atrilumen 6y agoChoo-Choo! https://choo.io https://choo.io
- tantaman 6y agoSvelte is technically "interface as a function of state" But I do agree, custom template syntax is a non-starter.
- tantaman 6y agoalso, it is pretty amazing what you can do without a framework and how simple your code can be if you code in an "interface as a function of state" style. example: https://github.com/tantaman/fk-your-frameworks-todomvc https://github.com/tantaman/fk-your-frameworks-todomvc