Skip to content

Conversation

LeoDanielsson
Copy link
Contributor

In connectAdvanced.js, window.document.createElement is checked to determine whether the code is running server side. In useSelector only window !== undefined is checked.

Many projects polyfill window on the server, which causes the useLayoutEffect warning when using useSelector. Changing to the more specific condition fixes this.

@netlify
Copy link

netlify bot commented Oct 8, 2019

Deploy preview for react-redux-docs ready!

Built with commit 94bd771

https://deploy-preview-1419--react-redux-docs.netlify.com

@timdorr
Copy link
Member

timdorr commented Oct 8, 2019

Thanks!

@timdorr timdorr merged commit 69d62e4 into reduxjs:master Oct 8, 2019
albertodev7 pushed a commit to albertodev7/react-redux that referenced this pull request Dec 8, 2022
aungkoman pushed a commit to ReactJSMyanmar/react-redux that referenced this pull request Dec 28, 2023
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.

2 participants