4 ms·
I feel like part of the problem with react libraries is that they implement their code "the react way" which basically means forcing it into your tree hierarchy
by anonytrary 8y ago
I feel like part of the problem with react libraries is that they implement their code "the react way" which basically means forcing it into your tree hierarchy. Dealing with dozens of higher order components gets really annoying after a while.
- k__ 8y agoDoesn't much of this go away with hooks? Before we had one hierarchy where everything was a component, logic and visuals. Now we have two hierarchies where visuals are components and logic are hooks.
- jamesknelson 8y agoYeah, this is definitely a thing. I'm a bit conflicted over it. One one hand, staying within the world of React components gives you a lot of functionality for free. And with Suspense and Hooks, the amount you can do within a component has become even greater. On the other hand, there are still things that you can't do within a component. For example, you can't easily run an async function once when the component mounts - which in my opinion, would be the perfect way to fetch data. I've been building Navi to try and create a more natural way to map routes to views and a stream of data. The thing is, the more edge cases you cover, the closer it becomes to just building React from scratch. At this point I still think that routing and data fetching is better handled externally from React, but it's less clear cut than it used to be.