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

Input only setState from props if setProps is defined. #350

Merged
merged 2 commits into from Oct 30, 2018

Conversation

Projects
None yet
2 participants
@T4rk1n
Copy link
Contributor

commented Oct 29, 2018

The component will receive the same initial props every time there is an update in the layout if they are not used in a callback and thus have no setProps. This add a check that only setState on the value if the component has setProps defined.

@T4rk1n T4rk1n requested a review from valentijnnieman Oct 29, 2018

@valentijnnieman
Copy link
Contributor

left a comment

Looks good to me.

@T4rk1n T4rk1n merged commit 96ae355 into master Oct 30, 2018

4 checks passed

ci/circleci: python-2.7 Your tests passed on CircleCI!
Details
ci/circleci: python-3.6 Your tests passed on CircleCI!
Details
ci/circleci: python-3.7 Your tests passed on CircleCI!
Details
percy/dash-core-components Visual review automatically approved, no visual changes found.
Details

@T4rk1n T4rk1n deleted the input-initial-props-state branch Oct 30, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.