Replies: 1 comment
-
@jacky-ew It looks like you opened up an issue with this same question and were told this isn't the right place to ask for usage help. Please ask over in the Reactiflux Discord at https://www.reactiflux.com , or on Stack Overflow. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What is the current behavior?
Props updates are not based on the states of parent component, for instance:
this.setState({ user: 'test' }, () => { this.setState({ extra: "extra_info" }) }) ; ==> test is passed to child component; extra_info is not
It happens once i applied connect to the child component
export default ChildComponent; ==> this works fine
export default connect(mapStateToProps) ==> this causes the parent state not updated into child's props
What is the expected behavior?
Props and states are updating accordingly.
Also a site note here, the parent was a class component, while the child is function component with react hooks, was trying to further expand the project using hooks instead.
Beta Was this translation helpful? Give feedback.
All reactions