Skip to content

PedroGontijo13/Quiz-5

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Quiz-5

  1. What is a "side effect" in React? What are some examples?

Side effect in React is any function or something that does something in other component. Like fetch data from an api and show this data in the window.

  1. What is NOT a "side effect" in React? Examples?

Is not a side effect any function or something that dosent do something in other component. Like a simple component function or

  1. When does React run your useEffect function? When does it NOT run

We need to use "useEffect" when we need to run a function or something after the page runs and run it again when the depencies have changed. It cant run when the dependecies of the page dont have changed.

  1. How would you explain what the "dependecies array" is?

The dependencies array is an array that contains the values that the useEffect hook depends on. When any of the values in the dependencies array change, the effect function will be called again.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published