-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(HeightAnimation): avoid usage of useLayoutEffect during SSR (#1749)
React warns about the usage of `useLayoutEffect` when React renders on the server (SSR). This behavior can be enabled with the `FAST_DEV` flag in gatsby-config. One "quick" fix is to use useEffect on the server, which again does nothing there. The React team has [some options](https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85) to that "problem". We basically use option 1, with this approach. Any other suggestions?
- Loading branch information
1 parent
00a4ab4
commit 667059b
Showing
2 changed files
with
8 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters