score:1
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);
Source: stackoverflow.com
Related Query
- Reducer not called after action is dispatched
- Reducer is not called even after action is dispatched and payload is received
- Reducer not getting called even after action is dispatched
- Reducer not called after action return?
- Redux is not returning data from reducer after action is called
- Action is not called after being canceled redux-saga
- After combining my reducer using combineReducer, action is not dispatching
- componentWillReceiveProps is not called despite action and reducer is called
- Action is not dispatched again after the props change in React-Redux
- redux connect mapStateToProps not called when action is dispatched
- Redux action ajax result not dispatched to reducer
- MapStateToProps not being called after changing STATE in reducer
- Then() is not working after the dispatched action in React
- Action Reducer function not being called
- Redux - Reducer is not being called when I dispatch an action
- Reducer not receiving action in redux or trouble with the action being called
- React-Redux: Action is Dispatched but Reducer is not updating the state
- Redux Action only dispatched on refresh and not after redirect
- How to listen for specific property changes in Redux store after an action is dispatched
- `componentDidMount()` function is not called after navigation
- redux action "is not a function" when dispatched from component
- React Redux : Action creator not calling reducer
- Redux - reducer not getting called
- Action does not trigger a reducer in React + Redux
- componentDidMount not being called after goBack navigation call
- redux-toolkit action not triggered in reducer
- componentDidMount seems not to be called after setState in ReactJS
- Reducer not catching LOCATION_CHANGE action
- How to use the updated value in redux store immediately after the action is dispatched in react js functional components
- React + Redux: undefined initial state and reducer not called as expected
More Query from same tag
- Refused to execute script from '.../bundle.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled
- Why aren't the two code blocks equivalent?
- React: Execute function on website exit, without giving an alert warning
- Trying to us React's useRef in an array to grab an audio' duration
- 'ValueChanging' does not exist on type 'Readonly<{}>'
- React Flexbox-grid build dynamically
- Problem when trying to change input value
- Migrating React ES6 to TypeScript: import statements don't work
- How to I pass a filters variable to useInfiniteQuery with pageParam?
- setState is not changing value of boolean parameter
- Retrieve data from a ReadableStream object?
- Why are my GlobalStyles not working after deploying with styled components?
- Asynchronous api calls with redux-saga
- Accessing Image Source as Props
- ReactJS and setState syntax
- Creating a YouTube playlist with React using Google's API
- Getting the selected value from ReactDropdown component
- How to get current location from react-router?
- Replacing input or text area with new element in React.js/JavaScript
- Trigger multipe 'transitions' at the same time
- create-react-app is showing all my code in production, how to hide it?
- GAE app.yaml settings for Flask backend with React and Flask frontend together on single deployment
- Firestore TypeError: collection().where() is not a function
- Material-UI dynamic Stepper component
- Forms as functional components with react
- Transform object array to new array structure
- How to map elements into two table columns, two elements per row?
- Update value of state when looping through object
- React CSS Modules - Apply style to child each tag
- Material-UI tab indicator returns back to the first tab item when i reload the page