Should UI state go in Redux?
Usually no. Local UI state like a modal open flag should stay in component state. Redux is for shared, complex state. Putting everything in Redux adds unnecessary complexity and re-renders.
Verify This Answer
Cross-check this information using these trusted sources:
More FAQs in Redux Toolkit Best Practices for Scalable React Apps
By feature, not by file type. A cart slice holds all cart state and logic. This keeps related code together and easy to find as the app grows, instead of scattering actions, types, and reducers across many files.
Select only the specific data a component needs, not a whole slice. If you select a large object when you need one field, the component re-renders whenever any part changes. Be specific in your selectors.
Use createAsyncThunk for data fetching and other async logic, and manage pending, fulfilled, and rejected cases in extraReducers. Do not hand-roll async in reducers, which must stay pure.
Still have questions?
Browse all our FAQs or reach out to our support team
