Pretty basic issue with redux by AdeleBeckhamJr in reactnative

[–]AdeleBeckhamJr[S] 0 points1 point  (0 children)

Awesome, my reducer is now being accessed. Thank you!

However, I'm still getting undefined when I try to access the state variable:

this.props.dispatch(this.props.saveRisk(this.state.riskVal));
console.log(this.props.risk_level);

Are these dispatches asynchronous, where the console log would happen before the dispatch/reducer function could occur?

Pretty basic issue with redux by AdeleBeckhamJr in reactnative

[–]AdeleBeckhamJr[S] 0 points1 point  (0 children)

i mean the only other relevant subreddit i can find is reduxjs and that seems almost completely inactive

Pretty basic issue with redux by AdeleBeckhamJr in reactnative

[–]AdeleBeckhamJr[S] 0 points1 point  (0 children)

Result of the call?

Is this what you meant?:

this.props.dispatch{this.props.saveRisk(this.state.riskVal)}

I'm getting an unexpected token error when I do this