Looking the examples from the README:
Given the \"bad\" structure:
[{
id: 1,
title: \'Some Article\',
author: {
id: 1,
name: \'Dan\'
}
},
In your reducer, keep a copy of the un-normalized data. This way, you can do something like this (when adding a new object to an array in state):
case ACTION:
return {
unNormalizedData: [...state.unNormalizedData, action.data],
normalizedData: normalize([...state.unNormalizedData, action.data], normalizrSchema),
}
If you do not want to keep un-normalized data in your store, you can also use denormalize