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

kerosene-ui: usePageVisbility hook triggers double render if initially visible #57

nhardy opened this issue Nov 8, 2019 · 0 comments


Copy link

@nhardy nhardy commented Nov 8, 2019

Because we default to false for visibility, and then immediately trigger the effect, the component will double render unnecessarily when useState === true. We should default this state value to !(document.hidden ?? false) instead.

@nhardy nhardy self-assigned this Nov 8, 2019
@nhardy nhardy added the bug label Nov 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.