3 ms·
Hey Chad, What do you use https://github.com/andreypopp/react-async https://github.com/andreypopp/react-async for? I was trying to wrap my head around that th
by davidwells 12y ago
Hey Chad,
What do you use https://github.com/andreypopp/react-async https://github.com/andreypopp/react-async for?
I was trying to wrap my head around that the read the warning:
"WARNING: Keeping data in React component's state is a bad idea. React component's state is for purely UI state, like "if this dropdown openned or closed?". In light of that, React Async is an anti-pattern so you shouldn't use it unless you are 100% sure you need it"
- chadpaulson 12y agoUsing react-async allowed me to make an aysnc request to an API before initializing the component and setting initial state. The library also enables the client to bootstrap / hydrate initial state generated on the server. I am currently working on a new project utilizing different modules (alt instead of reflux and react-router instead of react-router-component) which does not utilize react-async.