Test Yourself: Client-side Development
Test your knowledge of client-side development.
Choose the correct answer(s).
Does the useEffect
hook run before or after rendering? Why or why not?
The useEffect
hook runs before rendering and prevents the browser from painting. This is because it initializes the data used in the DOM.
The useEffect
hook runs before rendering and doesn’t prevent the browser from painting. This is because it initializes the data used in the DOM.
The useEffect
effects runs after rendering and prevents the browser from painting. This is because it runs the side effects that affect the DOM.
The useEffect
runs after rendering and doesn’t prevent the browser from painting. This is because it runs the side effects that affect the DOM.
Get hands-on with 1400+ tech skills courses.