# organizing-state

[![Redux Logo](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/official/d33wubrfki0l68.cloudfront.net/0834d0215db51e91525a25acf97433051f280f2f/c30f5/img/redux.svg)**Redux**](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/index.html)

[Getting Started](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/introduction/getting-started.html)[Tutorial](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/tutorials/essentials/part-1-overview-concepts.html)[API](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/api/api-reference.html)[FAQ](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/faq.html)[Best Practices](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/style-guide/style-guide.html)[GitHub](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/official/github.com/reduxjs/redux.html)[Need help?](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/introduction/getting-started.html#help-and-discussion)

🌜

🌞

Search

[![Redux Logo](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/official/d33wubrfki0l68.cloudfront.net/0834d0215db51e91525a25acf97433051f280f2f/c30f5/img/redux.svg)**Redux**](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/index.html)

* [Introduction](#!)
  * [Getting Started with Redux](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/introduction/getting-started.html)
  * [Installation](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/introduction/installation.html)
  * [Core Concepts](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/introduction/core-concepts.html)
  * [Learning Resources](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/introduction/learning-resources.html)
  * [Ecosystem](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/introduction/ecosystem.html)
  * [Examples](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/introduction/examples.html)
* [Tutorials](#!)
  * [Tutorials Index](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/tutorials/index.html)
  * [Quick Start](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/tutorials/quick-start.html)
  * [TypeScript Quick Start](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/tutorials/typescript-quick-start.html)
  * [Redux Essentials](#!)
    * [Redux Overview and Concepts](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/tutorials/essentials/part-1-overview-concepts.html)
    * [Redux App Structure](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/tutorials/essentials/part-2-app-structure.html)
    * [Basic Redux Data Flow](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/tutorials/essentials/part-3-data-flow.html)
    * [Using Redux Data](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/tutorials/essentials/part-4-using-data.html)
    * [Async Logic and Data Fetching](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/tutorials/essentials/part-5-async-logic.html)
    * [Performance and Normalizing Data](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/tutorials/essentials/part-6-performance-normalization.html)
  * [Redux Fundamentals](#!)
    * [Redux Overview](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/tutorials/fundamentals/part-1-overview.html)
    * [Redux Concepts and Data Flow](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/tutorials/fundamentals/part-2-concepts-data-flow.html)
    * [State, Actions, and Reducers](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/tutorials/fundamentals/part-3-state-actions-reducers.html)
    * [Store](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/tutorials/fundamentals/part-4-store.html)
    * [UI and React](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/tutorials/fundamentals/part-5-ui-react.html)
    * [Async Logic and Data Fetching](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/tutorials/fundamentals/part-6-async-logic.html)
    * [Standard Redux Patterns](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/tutorials/fundamentals/part-7-standard-patterns.html)
    * [Modern Redux with Redux Toolkit](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/tutorials/fundamentals/part-8-modern-redux.html)
* [Recipes](#!)
  * [Recipes: Index](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/recipes/recipe-index.html)
  * [Configuring Your Store](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/recipes/configuring-your-store.html)
  * [Usage With TypeScript](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/recipes/usage-with-typescript.html)
  * [Migrating to Redux](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/recipes/migrating-to-redux.html)
  * [Using Object Spread Operator](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/recipes/using-object-spread-operator.html)
  * [Reducing Boilerplate](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/recipes/reducing-boilerplate.html)
  * [Server Rendering](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/recipes/server-rendering.html)
  * [Writing Tests](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/recipes/writing-tests.html)
  * [Computing Derived Data](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/recipes/computing-derived-data.html)
  * [Implementing Undo History](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/recipes/implementing-undo-history.html)
  * [Isolating Redux Sub-Apps](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/recipes/isolating-redux-sub-apps.html)
  * [Code Splitting](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/recipes/code-splitting.html)
  * [Troubleshooting](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/recipes/troubleshooting.html)
  * [Structuring Reducers](#!)
    * [Structuring Reducers](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/recipes/structuring-reducers/structuring-reducers.html)
    * [Prerequisite Concepts](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/recipes/structuring-reducers/prerequisite-concepts.html)
    * [Basic Reducer Structure](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/recipes/structuring-reducers/basic-reducer-structure.html)
    * [Splitting Reducer Logic](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/recipes/structuring-reducers/splitting-reducer-logic.html)
    * [Refactoring Reducers Example](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/recipes/structuring-reducers/refactoring-reducer-example.html)
    * [Using combineReducers](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/recipes/structuring-reducers/using-combinereducers.html)
    * [Beyond combineReducers](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/recipes/structuring-reducers/beyond-combinereducers.html)
    * [Normalizing State Shape](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/recipes/structuring-reducers/normalizing-state-shape.html)
    * [Updating Normalized Data](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/recipes/structuring-reducers/updating-normalized-data.html)
    * [Reusing Reducer Logic](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/recipes/structuring-reducers/reusing-reducer-logic.html)
    * [Immutable Update Patterns](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/recipes/structuring-reducers/immutable-update-patterns.html)
    * [Initializing State](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/recipes/structuring-reducers/initializing-state.html)
* [Understanding Redux](#!)
  * [Thinking in Redux](#!)
    * [Motivation](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/understanding/thinking-in-redux/motivation.html)
    * [Three Principles](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/understanding/thinking-in-redux/three-principles.html)
    * [Glossary](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/understanding/thinking-in-redux/glossary.html)
  * [History and Design](#!)
    * [Prior Art](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/understanding/history-and-design/prior-art.html)
    * [Middleware](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/understanding/history-and-design/middleware.html)
* [FAQ](#!)
  * [FAQ Index](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/faq.html)
  * [General](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/md-docs/general.html)
  * [Reducers](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/md-docs/reducers.html)
  * [Organizing State](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/md-docs/organizing-state.html)
  * [Store Setup](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/md-docs/store-setup.html)
  * [Actions](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/md-docs/actions.html)
  * [Immutable Data](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/md-docs/immutable-data.html)
  * [Code Structure](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/md-docs/code-structure.html)
  * [Performance](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/md-docs/performance.html)
  * [Design Decisions](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/md-docs/design-decisions.html)
  * [React Redux](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/md-docs/react-redux.html)
  * [Miscellaneous](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/md-docs/miscellaneous.html)
* [Style Guide](#!)
  * [Style Guide: Best Practices](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/style-guide/style-guide.html)
* [API Reference](#!)
  * [API Reference](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/api/api-reference.html)
  * [createStore](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/api/createstore.html)
  * [Store](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/api/store.html)
  * [combineReducers](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/api/combinereducers.html)
  * [applyMiddleware](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/api/applymiddleware.html)
  * [bindActionCreators](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/api/bindactioncreators.html)
  * [compose](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/api/compose.html)
* [Redux Toolkit](#!)
  * [Redux Toolkit: Overview](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/redux-toolkit/overview.html)

## Redux FAQ: Organizing State[#](#redux-faq-organizing-state)

### Table of Contents[#](#table-of-contents)

* [Redux FAQ: Organizing State](#redux-faq-organizing-state)
  * [Table of Contents](#table-of-contents)
  * [Organizing State](#organizing-state)
    * [Do I have to put all my state into Redux? Should I ever use React's `setState()`?](#do-i-have-to-put-all-my-state-into-redux-should-i-ever-use-reacts-setstate)
      * [Further information](#further-information)
    * [Can I put functions, promises, or other non-serializable items in my store state?](#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)
      * [Further information](#further-information-1)
    * [How do I organize nested or duplicate data in my state?](#how-do-i-organize-nested-or-duplicate-data-in-my-state)
      * [Further information](#further-information-2)
    * [Should I put form state or other UI state in my store?](#should-i-put-form-state-or-other-ui-state-in-my-store)
      * [Further Information](#further-information-3)

### Organizing State[#](#organizing-state)

#### Do I have to put all my state into Redux? Should I ever use React's `setState()`?[#](#do-i-have-to-put-all-my-state-into-redux-should-i-ever-use-reacts-setstate)

There is no “right” answer for this. Some users prefer to keep every single piece of data in Redux, to maintain a fully serializable and controlled version of their application at all times. Others prefer to keep non-critical or UI state, such as “is this dropdown currently open”, inside a component's internal state.

***Using local component state is fine***. As a developer, it is *your* job to determine what kinds of state make up your application, and where each piece of state should live. Find a balance that works for you, and go with it.

Some common rules of thumb for determining what kind of data should be put into Redux:

* Do other parts of the application care about this data?
* Do you need to be able to create further derived data based on this original data?
* Is the same data being used to drive multiple components?
* Is there value to you in being able to restore this state to a given point in time (ie, time travel debugging)?
* Do you want to cache the data (ie, use what's in state if it's already there instead of re-requesting it)?
* Do you want to keep this data consistent while hot-reloading UI components (which may lose their internal state when swapped)?

There are a number of community packages that implement various approaches for storing per-component state in a Redux store instead, such as [redux-component](https://github.com/bgoonz/Learning-Redux/blob/master/github.com/tomchentw-deprecated/redux-component.html), [redux-react-local](https://github.com/bgoonz/Learning-Redux/blob/master/github.com/threepointone/redux-react-local.html), and more. It's also possible to apply Redux's principles and concept of reducers to the task of updating local component state as well, along the lines of `this.setState( (previousState) => reducer(previousState, someAction))`.

**Further information**[**#**](#further-information)

**Articles**

* [When (and when not) to reach for Redux](https://github.com/bgoonz/Learning-Redux/blob/master/changelog.com/posts/when-and-when-not-to-reach-for-redux.html)
* [You Might Not Need Redux](https://github.com/bgoonz/Learning-Redux/blob/master/medium.com/@dan_abramov/you-might-not-need-redux-be46360cf367.html)
* [Finding `state`'s place with React and Redux](https://github.com/bgoonz/Learning-Redux/blob/master/medium.com/@adamrackis/finding-state-s-place-with-react-and-redux-e9a586630172.html)
* [A Case for setState](https://github.com/bgoonz/Learning-Redux/blob/master/medium.com/@zackargyle/a-case-for-setstate-1f1c47cd3f73.html)
* [How to handle state in React: the missing FAQ](https://github.com/bgoonz/Learning-Redux/blob/master/medium.com/react-ecosystem/how-to-handle-state-in-react-6f2d3cd73a0c.html)
* [Where to Hold React Component Data: state, store, static, and this](https://github.com/bgoonz/Learning-Redux/blob/master/www.freecodecamp.org/news/where-do-i-belong-a-guide-to-saving-react-component-data-in-state-store-static-and-this-c49b335e2a00/index.html)
* [The 5 Types of React Application State](https://github.com/bgoonz/Learning-Redux/blob/master/jamesknelson.com/5-types-react-application-state/index.html)
* [Shape Your Redux Store Like Your Database](https://github.com/bgoonz/Learning-Redux/blob/master/hackernoon.com/shape-your-redux-store-like-your-database-98faa4754fd5.html)

**Discussions**

* [#159: Investigate using Redux for pseudo-local component state](https://github.com/bgoonz/Learning-Redux/blob/master/github.com/reduxjs/redux/issues/159.html)
* [#1098: Using Redux in reusable React component](https://github.com/bgoonz/Learning-Redux/blob/master/github.com/reduxjs/redux/issues/1098.html)
* [#1287: How to choose between Redux's store and React's state?](https://github.com/bgoonz/Learning-Redux/blob/master/github.com/reduxjs/redux/issues/1287.html)
* [#1385: What are the disadvantages of storing all your state in a single immutable atom?](https://github.com/bgoonz/Learning-Redux/blob/master/github.com/reduxjs/redux/issues/1385.html)
* [Twitter: Should I keep something in React component state?](https://github.com/bgoonz/Learning-Redux/blob/master/twitter.com/dan_abramov/status/749710501916139520.html)
* [Twitter: Using a reducer to update a component](https://github.com/bgoonz/Learning-Redux/blob/master/twitter.com/dan_abramov/status/736310245945933824.html)
* [React Forums: Redux and global state vs local state](https://github.com/bgoonz/Learning-Redux/blob/master/discuss.reactjs.org/t/redux-and-global-state-vs-local-state/4187/README.md)
* [Reddit: "When should I put something into my Redux store?"](https://github.com/bgoonz/Learning-Redux/blob/master/www.reddit.com/r/reactjs/comments/4w04to/when_using_redux_should_all_asynchronous_actions/d63u4o8.html)
* [Stack Overflow: Why is state all in one place, even state that isn't global?](https://github.com/bgoonz/Learning-Redux/blob/master/stackoverflow.com/questions/35664594/redux-why-is-state-all-in-one-place-even-state-that-isnt-global.html)
* [Stack Overflow: Should all component state be kept in Redux store?](https://github.com/bgoonz/Learning-Redux/blob/master/stackoverflow.com/questions/35328056/react-redux-should-all-component-states-be-kept-in-redux-store.html)

**Libraries**

* [Redux Addons Catalog: Component State](https://github.com/bgoonz/Learning-Redux/blob/master/github.com/markerikson/redux-ecosystem-links/blob/master/component-state.html)

#### Can I put functions, promises, or other non-serializable items in my store state?[#](#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)

It is highly recommended that you only put plain serializable objects, arrays, and primitives into your store. It's *technically* possible to insert non-serializable items into the store, but doing so can break the ability to persist and rehydrate the contents of a store, as well as interfere with time-travel debugging.

If you are okay with things like persistence and time-travel debugging potentially not working as intended, then you are totally welcome to put non-serializable items into your Redux store. Ultimately, it's *your* application, and how you implement it is up to you. As with many other things about Redux, just be sure you understand what tradeoffs are involved.

**Further information**[**#**](#further-information-1)

**Discussions**

* [#1248: Is it ok and possible to store a react component in a reducer?](https://github.com/bgoonz/Learning-Redux/blob/master/github.com/reduxjs/redux/issues/1248.html)
* [#1279: Have any suggestions for where to put a Map Component in Flux?](https://github.com/bgoonz/Learning-Redux/blob/master/github.com/reduxjs/redux/issues/1279.html)
* [#1390: Component Loading](https://github.com/bgoonz/Learning-Redux/blob/master/github.com/reduxjs/redux/issues/1390.html)
* [#1407: Just sharing a great base class](https://github.com/bgoonz/Learning-Redux/blob/master/github.com/reduxjs/redux/issues/1407.html)
* [#1793: React Elements in Redux State](https://github.com/bgoonz/Learning-Redux/blob/master/github.com/reduxjs/redux/issues/1793.html)

#### How do I organize nested or duplicate data in my state?[#](#how-do-i-organize-nested-or-duplicate-data-in-my-state)

Data with IDs, nesting, or relationships should generally be stored in a “normalized” fashion: each object should be stored once, keyed by ID, and other objects that reference it should only store the ID rather than a copy of the entire object. It may help to think of parts of your store as a database, with individual “tables” per item type. Libraries such as [normalizr](https://github.com/bgoonz/Learning-Redux/blob/master/github.com/paularmstrong/normalizr.html) and [redux-orm](https://github.com/bgoonz/Learning-Redux/blob/master/github.com/redux-orm/redux-orm.html) can provide help and abstractions in managing normalized data.

**Further information**[**#**](#further-information-2)

**Documentation**

* [Redux Fundamentals: Async Logic and Data Flow](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/tutorials/fundamentals/part-6-async-logic.html)
* [Redux Fundamentals: Standard Redux Patterns](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/tutorials/fundamentals/part-7-standard-patterns.html)
* [Examples: Real World example](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/introduction/examples.html#real-world)
* [Recipes: Structuring Reducers - Prerequisite Concepts](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/recipes/structuring-reducers/prerequisite-concepts.html#normalizing-data)
* [Recipes: Structuring Reducers - Normalizing State Shape](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/recipes/structuring-reducers/normalizing-state-shape.html)
* [Examples: Tree View](https://github.com/bgoonz/Learning-Redux/blob/master/github.com/reduxjs/redux/tree/master/examples/tree-view.html)

**Articles**

* [High-Performance Redux](https://github.com/bgoonz/Learning-Redux/blob/master/somebody32.github.io/high-performance-redux/index.html)
* [Querying a Redux Store](https://github.com/bgoonz/Learning-Redux/blob/master/medium.com/@adamrackis/querying-a-redux-store-37db8c7f3b0f.html)

**Discussions**

* [#316: How to create nested reducers?](https://github.com/bgoonz/Learning-Redux/blob/master/github.com/reduxjs/redux/issues/316.html)
* [#815: Working with Data Structures](https://github.com/bgoonz/Learning-Redux/blob/master/github.com/reduxjs/redux/issues/815.html)
* [#946: Best way to update related state fields with split reducers?](https://github.com/bgoonz/Learning-Redux/blob/master/github.com/reduxjs/redux/issues/946.html)
* [#994: How to cut the boilerplate when updating nested entities?](https://github.com/bgoonz/Learning-Redux/blob/master/github.com/reduxjs/redux/issues/994.html)
* [#1255: Normalizr usage with nested objects in React/Redux](https://github.com/bgoonz/Learning-Redux/blob/master/github.com/reduxjs/redux/issues/1255.html)
* [#1269: Add tree view example](https://github.com/bgoonz/Learning-Redux/blob/master/github.com/reduxjs/redux/pull/1269.html)
* [#1824: Normalising state and garbage collection](https://github.com/bgoonz/Learning-Redux/blob/master/github.com/reduxjs/redux/issues/1824.html#issuecomment-228585904)
* [Twitter: state shape should be normalized](https://github.com/bgoonz/Learning-Redux/blob/master/twitter.com/dan_abramov/status/715507260244496384.html)
* [Stack Overflow: How to handle tree-shaped entities in Redux reducers?](https://github.com/bgoonz/Learning-Redux/blob/master/stackoverflow.com/questions/32798193/how-to-handle-tree-shaped-entities-in-redux-reducers.html)
* [Stack Overflow: How to optimize small updates to props of nested components in React + Redux?](https://github.com/bgoonz/Learning-Redux/blob/master/stackoverflow.com/questions/37264415/how-to-optimize-small-updates-to-props-of-nested-component-in-react-redux.html)

#### Should I put form state or other UI state in my store?[#](#should-i-put-form-state-or-other-ui-state-in-my-store)

The [same rules of thumb for deciding what should go in the Redux store](#do-i-have-to-put-all-my-state-into-redux-should-i-ever-use-reacts-setstate) apply for this question as well.

**Based on those rules of thumb, most form state doesn't need to go into Redux**, as it's probably not being shared between components. However, that decision is always going to be specific to you and your application. You might choose to keep some form state in Redux because you are editing data that came from the store originally, or because you do need to see the work-in-progress values reflected in other components elsewhere in the application. On the other hand, it may be a lot simpler to keep the form state local to the component, and only dispatch an action to put the data in the store once the user is done with the form.

Based on this, in most cases you probably don't need a Redux-based form management library either. We suggest trying these approaches, in this order:

* Even if the data is coming from the Redux store, start by writing your form logic by hand. It's likely this is all you'll need. (See [**Gosha Arinich's posts on working with forms in React**](https://github.com/bgoonz/Learning-Redux/blob/master/goshakkk.name/on-forms-react/index.html) for some excellent guidance on this.)
* If you decide that writing forms "manually" is too difficult, try a React-based form library like [Formik](https://github.com/bgoonz/Learning-Redux/blob/master/github.com/formium/formik.html) or [React-Final-Form](https://github.com/bgoonz/Learning-Redux/blob/master/github.com/final-form/react-final-form.html).
* If you are absolutely sure you *must* use a Redux-based form library because the other approaches aren't sufficient, then you may finally want to look at [Redux-Form](https://github.com/bgoonz/Learning-Redux/blob/master/github.com/redux-form/redux-form.html) and [React-Redux-Form](https://github.com/bgoonz/Learning-Redux/blob/master/github.com/davidkpiano/react-redux-form.html).

If you are keeping form state in Redux, you should take some time to consider performance characteristics. Dispatching an action on every keystroke of a text input probably isn't worthwhile, and you may want to look into [ways to buffer keystrokes to keep changes local before dispatching](https://github.com/bgoonz/Learning-Redux/blob/master/blog.isquaredsoftware.com/2017/01/practical-redux-part-7-forms-editing-reducers/index.html). As always, take some time to analyze the overall performance needs of your own application.

Other kinds of UI state follow these rules of thumb as well. The classic example is tracking an `isDropdownOpen` flag. In most situations, the rest of the app doesn't care about this, so in most cases it should stay in component state. However, depending on your application, it may make sense to use Redux to [manage dialogs and other popups](https://github.com/bgoonz/Learning-Redux/blob/master/blog.isquaredsoftware.com/2017/07/practical-redux-part-10-managing-modals/index.html), tabs, expanding panels, and so on.

**Further Information**[**#**](#further-information-3)

**Articles**

* [Gosha Arinich: Writings on Forms in React](https://github.com/bgoonz/Learning-Redux/blob/master/goshakkk.name/on-forms-react/index.html)
* [Practical Redux, Part 6: Connected Lists and Forms](https://github.com/bgoonz/Learning-Redux/blob/master/blog.isquaredsoftware.com/2017/01/practical-redux-part-6-connected-lists-forms-and-performance/index.html)
* [Practical Redux, Part 7: Form Change Handling](https://github.com/bgoonz/Learning-Redux/blob/master/blog.isquaredsoftware.com/2017/01/practical-redux-part-7-forms-editing-reducers/index.html)
* [Practical Redux, Part 10: Managing Modals and Context Menus](https://github.com/bgoonz/Learning-Redux/blob/master/blog.isquaredsoftware.com/2017/07/practical-redux-part-10-managing-modals/index.html)
* [React/Redux Links: Redux UI Management](https://github.com/bgoonz/Learning-Redux/blob/master/github.com/markerikson/react-redux-links/blob/master/redux-ui-management.html)

Previous

« Reducers

Next

Store Setup »

* [Table of Contents](#table-of-contents)
* [Organizing State](#organizing-state)
  * [Do I have to put all my state into Redux? Should I ever use React's `setState()`?](#do-i-have-to-put-all-my-state-into-redux-should-i-ever-use-reacts-setstate)
  * [Can I put functions, promises, or other non-serializable items in my store state?](#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)
  * [How do I organize nested or duplicate data in my state?](#how-do-i-organize-nested-or-duplicate-data-in-my-state)
  * [Should I put form state or other UI state in my store?](#should-i-put-form-state-or-other-ui-state-in-my-store)

**Docs**

* [Getting Started](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/introduction/getting-started.html)
* [Tutorial](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/tutorials/essentials/part-1-overview-concepts.html)
* [FAQ](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/faq.html)
* [API Reference](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/api/api-reference.html)

**Community**

* [Reactiflux Discord](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/official/discord.com/invite/0ZcbPKXt5bZ6au5t.html)
* [Stack Overflow](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/official/stackoverflow.com/questions/tagged/redux.html)
* [Feedback](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/introduction/getting-started.html#help-and-discussion)

**More**

* [GitHub](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/official/github.com/reduxjs/redux.html)
* [![Deploys by Netlify](https://github.com/bgoonz/Learning-Redux/blob/master/www.netlify.com/img/global/badges/netlify-color-accent.svg)](https://github.com/bgoonz/Learning-Redux/blob/master/www.netlify.com/index.html)

[![Redux Logo](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/official/d33wubrfki0l68.cloudfront.net/0834d0215db51e91525a25acf97433051f280f2f/c30f5/img/redux.svg)![Redux Logo](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/official/d33wubrfki0l68.cloudfront.net/0834d0215db51e91525a25acf97433051f280f2f/c30f5/img/redux.svg)](https://github.com/bgoonz/Learning-Redux/blob/master/DOCS/index.html)

Copyright © 2015–2021 Dan Abramov and the Redux documentation authors.
