Replies: 1 comment 1 reply
-
This is really a shift in how the React ecosystem writes components today. It's not exclusive to Redux - any component that uses hooks for its own data fetching or relies on See my post Thoughts on React Hooks, Redux, and Separation of Concerns and talk ReactBoston 2019: Hooks, HOCs, and Tradeoffs for some thoughts on this topic. In addition, the community has really shifted towards writing tests and examples that use components as they are used in the app. A lot of this is driven by the philosophy of React Testing Library. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey,
I came back to using redux after ~4 years of not having too much to deal with frontend side state management.
I've successfully adopted Redux using hooks in the latest React app I've been building however I struggle with having components reusable and available to display in Storybook without involving the whole redux machinery (just giving the components sample data they use as props in separate stories).
When I have been using redux last time there was a concept of presentational (dumb) and container components (aware of the global state) which I think solved the issue of having components without state management, just as they are.
Using hooks this approach is nearly impossible to achieve (with my current knowledge) cause the components are tightly coupled to redux stuff.
What's the current, modern and scalable approach to have components and redux stuff separated, or at least able to live in a single project with Storybook?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions