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

Fix hot module reload issues caused by subtle bug in useSelector #279

Merged
merged 2 commits into from
May 25, 2020

Conversation

jlfwong
Copy link
Owner

@jlfwong jlfwong commented May 25, 2020

To test this, load a profile, then save a .tsx file locally. Before this change, it would bring you back to the welcome screen after hot reload. After this change, application state is still displayed. This is because before the change, the setGLCanvas action wasn't resulting in a re-render because it occurred between the initial render and the useLayoutEffect callback.

Fixes #276

@coveralls
Copy link

coveralls commented May 25, 2020

Coverage Status

Coverage decreased (-0.01%) to 46.929% when pulling 02d2f48 on jlfwong/fix-hmr into 3519949 on master.

@jlfwong jlfwong merged commit 80b747a into master May 25, 2020
@jlfwong jlfwong deleted the jlfwong/fix-hmr branch May 25, 2020 22:42
jackerghan pushed a commit to jackerghan/speedscope that referenced this pull request Jul 28, 2023
…wong#279)

To test this, load a profile, then save a `.tsx` file locally. Before this change, it would bring you back to the welcome screen after hot reload. After this change, application state is still displayed. This is because before the change, the `setGLCanvas` action wasn't resulting in a re-render because it occurred between the initial render and the `useLayoutEffect` callback.

Fixes jlfwong#276
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.

Dev-only: hot reloading broken after preact changes
2 participants