Are you done of writing a lot of boilerplate just for fetching data from your API? This talk is for you and you will see how to get rid of this big amount of code with a simpler and effective solution. It’s not the perfect solution, yet, but we will walk through the sad parts of react-query.
3. ⚠ UWAGA! ⚠
• Redux is great!
• In this talk I will show some cases where
react-query can help!
• Sorry! Still no silver bullet :(
4. • Single source of truth
• Handle frequently updates
• Familiar organization
• Great tooling
• Time travel
• Props drilling
• <NAME YOUR UNIQUE REASON HERE>
Why do we use
redux?
5. • Cache API responses
• Show loader and error messages
• Optimistic updates
• Data normalization
• …etc
How in fact we use
it?
REDUCERS
ACTIONS
STORE,
MIDDLEWARES
ACTIONS CREATORS
SELECTORS
REDUX THUNK
9. “But Marcos, I need some more advanced control
over it to pass some blah while fetching the data or
do some other control on it”
Me, asking myself to sounds cool
10. • Use Axios
• Use fetch
• Use XHR
• You have the power and control
Bring your own
data fetcher :)
13. • Offline/retry support
• Experimental local storage cache
• Selectors
• Improved SSR
• Bi-directional Infinity scroll
• useQueries (batch your queries)
• And much more
V3
14. “Not everything are roses, there
are some buttercups also!”
Yeah, just me again trying to be funny… hope it works 😅
15. • No normalized data support
• Do you really use it?
Trade offs (?)