Skip to main content

What does state normalization mean?

State normalization is a way to store data in state (a store, a service, etc.) as a flat, related structure, rather than as nested objects.

Why it's needed: to simplify updates, lookups, and synchronization between related entities.

Example

Example without normalization:

ts
{ users: [ { id: 1, name: 'Maria', posts: [{ id: 10, title: 'Hello' }] } ] }

If a post changes, you have to search for it deep inside the users array.

After normalization:

ts
{ users: { 1: { id: 1, name: 'Maria', posts: [10] } }, posts: { 10: { id: 10, title: 'Hello' } } }

Now you can easily update a specific post by id without touching the whole tree.

The idea is the same as in a relational database: each entity is its own "table" dictionary (entities), and relationships are expressed through identifiers.

Result

  • easier to update and cache data,
  • less duplication,
  • cleaner logic when syncing with the server,
  • fewer re-renders on changes.

Short Answer

Interview ready
Premium

A concise answer to help you respond confidently on this topic during an interview.