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

chore: remove the never used 'when' prop in KeyboardZone to avoid rerendering #2000

Merged
merged 4 commits into from
Feb 20, 2020

Conversation

yeze322
Copy link
Contributor

@yeze322 yeze322 commented Feb 18, 2020

Description

closes #1496

Still the sample problem, click on a node will redraw twice.

Root cause: anti-pattern usage of useEffect hook, we shouldn't setState inside it.

useEffect(() => {
  setKeyboardState(newState);
  onSelect(id)
}, [id])

Task Item

#1496

Screenshots

@cwhitten cwhitten merged commit b58fa5b into microsoft:master Feb 20, 2020
@a-b-r-o-w-n a-b-r-o-w-n mentioned this pull request Feb 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants