3 ms·
I really only have familiarity with React-query, but I'd guess it's something like: While of course React-query plugs into the React lifecycle, it's also kind
by pcthrowaway 4y ago
I really only have familiarity with React-query, but I'd guess it's something like:
While of course React-query plugs into the React lifecycle, it's also kind of an escape hatch that plays nice with React.
Managing the fetch function calls, their state, their resolutions, and the cache, all probably happens outside of React, but then changes to any of the query state are reflected into the React lifecycle.
This probably lets him do something like using localstorage for storing cached query data, communicating between tabs, etc