4 ms·
How do you test individual components in isolation if they depend on the global state store?
by nohuhu 7y ago
How do you test individual components in isolation if they depend on the global state store?
- root_axis 7y agoThat's a code smell. 99% of components in a project should rely on props.
- nohuhu 7y agoHow does that play with Redux Hooks for example? https://react-redux.js.org/next/api/hooks https://react-redux.js.org/next/api/hooks If you are using hooks in your components, you need the global store instance. To call this unit testing is too big a stretch for me.