6 ms·
Uhm... no, I don't think react-async is a good way to manage data flow in React applications. I wrote it when I started to work with React but now I consider Re
by andreypopp 12y ago
Uhm... no, I don't think react-async is a good way to manage data flow in React applications. I wrote it when I started to work with React but now I consider React Async an anti-pattern.
- boucher 12y agoInteresting. I actually ended up not using react-async, because we were trying to manage all the data at the top level, but I'm not entirely convinced that's the way to go (at least not for every app). I just started playing around with react pretty recently, and it definitely seems like people's opinions about how to structure things have shifted pretty quickly.
- colinramsay 12y agoHave you considered marking it as deprecated on the repo's readme? I'd be interested in reading your thought processes between writing react-async and decided it was an anti-pattern.
- andreypopp 12y agoI've added a paragraph to the README. Basically UI lifecycle and data flow should be decoupled. React component's state (which is used by React Async to store data) is for UI state and not for data.
- colinramsay 12y agoThanks!
- swartkrans 12y agoWhy do you think it's an anti-pattern?