← BYTES
React.js·Starter·Ref: 4.1.18

What is the basic shape of a `useEffect` call?

Have a question about this video? Mention reference 4.1.18 when you contact us.

a.`useEffect(dependencyArray, callback)`
b.`useEffect()` takes no arguments at all
c.`useEffect(callback, dependencyArray)`
d.`useEffect(component, props)`
`useEffect` takes the effect function first, and an optional array of dependencies second: `useEffect(() => { ... }, [dep1, dep2])`. The dependency array controls when the effect re-runs.

Find this on YouTube & Instagram

Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:

#BYTES#BYTES4118#Reactjs