score:1

Accepted answer

when you're calling updatemoneyvalue(newvalue), you're not dispatching the action, you're calling the action creator directly.

to go through redux, you need to call this.props.updatemoneyvalue(newvalue)

score:0

change:

state.set('moneyvalue', action.moneyvalue);

to:

state = state.set('moneyvalue', action.moneyvalue);

edit: that way, you "set the new state", without the state = you are changing the state but not using the changed state to later return it

score:0

when you map the state or dispatch your method become available in the props.

// this is the method that should tigger the action
this.props.updatemoneyvalue(newvalue);

Related Query

More Query from same tag