Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when the state change it is not changing the child component #11

Open
dan89farhan opened this issue Jun 23, 2020 · 0 comments
Open

when the state change it is not changing the child component #11

dan89farhan opened this issue Jun 23, 2020 · 0 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@dan89farhan
Copy link

dan89farhan commented Jun 23, 2020

please add the following method into your class to update this component when parent states get changed.

static getDerivedStateFromProps(nextProps) {
    return { count: nextProps.start }
}

Thanks

@yasaricli yasaricli self-assigned this Jun 23, 2020
@yasaricli yasaricli added the help wanted Extra attention is needed label Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants