There are different opinions on this, but the general view seems to be that redux should only contain "application state". Individual react components like dropdowns or modals will still have their own state.
There is still a lot of debate on this though, check out this issue for example about how to manage local component state: https://github.com/reactjs/redux/issues/159
Some projects have been popping up that are trying to solve this "problem":
- No need for state in React components if using Redux and React-Redux?
- Sync queryParameters with Redux state and react router for function components
- Using for loops and switch cases in React to dynamically render different components
- React components lifecycle, state and redux
- synchronise scroll of two react components without using state and actions
- Designing state for Reusable React Components and Browser history
- Architecture example for a multi-language application using React, React Redux or React Context, and Material UI
- React Redux re-fetch data using state and state change
- Using Jest and Enzyme to test functional React components that are using Redux
- How to use React Redux state for conditionally showing and Disabling a Button
- Approach for different HTML structure with React and using the same components
- State and routing for imported React components
- A state is undefined object when using React and Redux , Router
- Need a solution to fetch data from array and then push it to state using for each
- Using redux / toolkit for state slicing between components
- How to pass state from class components to global state when using react hooks for global state management
- Using one react state for multiple components
- How to wait for redux state change and then render page in React
- How to efficiently add variants for components using styled-components and React
- How to set state at the server for data from API using react redux
- Best way to fetch data from a REST api using react hooks and context for state management?
- Using React Redux Toolkit with Typescript - set state for reducer
- Using react datepicker, need to apply different styles for today's date and selected date
- Create a waiting loader alert for a post request using react and redux
- Using asynchronous obtained ListItem components from the state of a React component in Material-UI List for React
- i need to give admin rights to upload images for an ecommerce website using react and nextjs
- How to add new object into existing state using react and redux saga
- I need clarification for State and Lifecycle of react
- Using specific filename for React components and containers with Webpack
- write unit test for event handlers that updates some state in react using jest and enzyme
More Query from same tag
- TypeError: projects.map is not a function (React)
- How to properly update state with Firebase and useEffect()?
- How can I change the color inside a canvas element according to some data?
- How to pass internal state to global state using Redux
- ReactJs And Firestore: Properties of mapped objects are undefined
- CORS error when posting request in React app to PHP file in Apache server on localhost
- How to check states after sending request in server?
- Random Component Behavior
- How to handle Material UI onRowDeselected
- useState function is not working in functional component
- How to show different value returned from function for each rendered element from API in ReactJS?
- componentDidMount not setting state or re-rendering
- React Component not updating even after duplication of state in Redux reducer
- Is there any way to call the api and save it using useState in reactjs?
- can't setState in request.post method
- Map chart not load in react using fusion chart
- React Typescript - Error Objects are not valid as a React child
- I am trying to add link for react slick, but none of the links I tried worked
- VSCode debugging (F5) react app gives SyntaxError: Unexpected identifier
- Element type is invalid - Export default and default import
- undefined collection error when using simple schema and react (meteor app)
- Fetch API error handling
- Sorting a partial string date
- Fabric JS multiple object selection ignores movement isDisabled
- Async/Await in fetch() how to handle errors
- React state is not being updated by my call to the API
- React submit form on select change event
- Array is not defined but can be console logged out
- Handling with external logouts in React app
- Material UI + Typescript: Types of property 'color' are incompatible