Skip to content

Instantly share code, notes, and snippets.

View abdulrauf11's full-sized avatar
:octocat:
gm

Abdul Rauf | lilcoderman abdulrauf11

:octocat:
gm
View GitHub Profile
@gaearon
gaearon / uselayouteffect-ssr.md
Last active May 16, 2024 14:13
useLayoutEffect and server rendering

If you use server rendering, keep in mind that neither useLayoutEffect nor useEffect can run until the JavaScript is downloaded.

You might see a warning if you try to useLayoutEffect on the server. Here's two common ways to fix it.

Option 1: Convert to useEffect

If this effect isn't important for first render (i.e. if the UI still looks valid before it runs), then useEffect instead.

function MyComponent() {
@CodeMyUI
CodeMyUI / codevember-08-animated-svg-turbulence-filter.markdown
Created October 30, 2017 09:53
#Codevember 08 - Animated SVG Turbulence Filter