|
|
|
|
|
by nickdandakis
2427 days ago
|
|
Not to mention you can still keep your pure UI components separate from your components that have data fetching logic (aka containers). Components are highly reusable. Containers are coupled to specific API calls or logic. I still default to doing as much data fetching on the top-level page component as possible and trickling data down. But if there's certain logic or data fetching I re-use in multiple places that don't need to block the whole page, I'll definitely refactor that into hooks + containers and delegate that data fetching lower in the tree. |
|
These added features are simply extending that paradigm in a natural way that supports better UX, within the constraints of the javascript language.
Nobody says they are easy problems to solve, but it's sort of a non-sequitur to argue alternatives that don't solve them (or don't absolve one of having to solve them still.)