Being able to fetch data right in a component, where you need it, is immensely useful. The component is very resilient to change, which is the main reason why I'm advocating for accessing your query directly wherever you need to. It's not a silver bullet though - it comes with tradeoffs.

•13m read time•From tkdodo.eu
Post cover image
Table of contents
Being self-containedReact Context
7 Comments

Sort: