3 ms·
Didn’t catch any mention of hooks in this article. My advice is only use redux when two components need access to the same information within a few seconds of w
by deanclatworthy 7y ago
Didn’t catch any mention of hooks in this article. My advice is only use redux when two components need access to the same information within a few seconds of whatever you are doing.
Otherwise I’d put all data fetching into hooks which can give any component which uses it access to all kinds of information and the ability to conditionally render.
I have found this pattern to be cleaner than using component lifecycle methods. An example can be seen here:
https://github.com/deanc/buyxiny.com/blob/master/site/src/components/ItemList.js https://github.com/deanc/buyxiny.com/blob/master/site/src/co...