canonical-reducer-composition
canonical-reducer-composition copied to clipboard
Constructor overrites initial state?
the constructor examples overwrites initial state by default
so what if your initial state comes from outside?
how do you insert that after the CONSTRUCTOR
or
do we make the CONSTRUCTOR
method decide how to merge passed data?
CONSTRUCT (domain) {
return domain.concat(
Immutable.fromJS([
{
id: _.uniqueId(),
name: 'foo',
done: true
},
{
id: _.uniqueId(),
name: 'bar',
done: false
},
{
id: _.uniqueId(),
name: 'baz',
done: false
},
{
id: _.uniqueId(),
name: 'quux',
done: false
}
])
);
},