Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save iagodahlem/389ae046c3f65d44ce48ba06ade0b2c2 to your computer and use it in GitHub Desktop.
Save iagodahlem/389ae046c3f65d44ce48ba06ade0b2c2 to your computer and use it in GitHub Desktop.
Scalable Frontend - The State Layer - Normalized State Shape
{
articles: {
byId: {
'1': {
id: '1',
title: 'Managing all state in one reducer',
author: '1',
},
'2': {
id: '2',
title: 'Using combineReducers to manage reducer logic',
author: '2',
},
'3': {
id: '3',
title: 'Normalizing the state shape',
author: '1',
},
},
allIds: ['1', '2', '3'],
},
authors: {
byId: {
'1': {
id: '1',
name: 'Iago Dahlem Lorensini',
email: 'iagodahlemlorensini@gmail.com',
},
'2': {
id: '2',
name: 'Talysson de Oliveira Cassiano',
email: 'talyssonoc@gmail.com',
}
},
allIds: ['1', '2'],
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment