
The Senior Dev Approach to Data Fetching in React
The beauty of React is... flexibility. In 2013, React was released as a client manipulation framework. I know it's a library, Charlie ;) Two years later, a young man named Michael Jackson built React Router, so React could manage full-stack applications. But that was not enough. Tanner Linsley built React Query to support the notion that useEffect was a bad idea for managing APIs. The effrontery. But this has been the beauty of React. The flexibility to do stuff your way. The effrontery to create a personal approach in your cabinet and call it a better approach. This has been the beauty. And just maybe, a downside… Reusability in UI React perfectly solved the problem of UI reusability. They introduced "composition," where a component is a cocktail of JavaScript, CSS, and HTML. Stay with me. You create a component, and that is all you need. Changes in your UI are a function of a state change. Hence, UI = f(state). This means all you have to worry about is how the "state" in your applica
Continue reading on Dev.to
Opens in a new tab




