It would be simpler if .get just returned all the values, rather than accepting the property name as an argument. This would make it easier to get multiple values at once, and it would pair well with destructuring.
Before:
const a = state.get('a');
const b = state.get('b');
It would be simpler if
.get
just returned all the values, rather than accepting the property name as an argument. This would make it easier to get multiple values at once, and it would pair well with destructuring.Before:
After
It would also be symmetric with
set
this way.