Implement words reducer
Closed this issue · 0 comments
nadeemkhedr commented
Development
In the reducer handle the following actions
WORD_REMOVE //word is removed
WORD_ADD //word is added
the words
reducer will contain two reducers
byId
allIds
And the store should look like this
const store = {
...
words: {
byId: {
'word1': {
id: 'word1',
text: 'Word'
},
'word2': {
id: 'word2',
words: 'Complicated'
}
},
allIds: ['word1', 'word2']
}
};