- How do you create
Nested Routes react-router-dom
configuration? - Read about
createHashRouter
,createMemoryRouter
from React Router docs. - What is the
order of life cycle method calls
inClass Based Components
? - Why do we use
componentDidMount
? - Why do we use
componentWillUnmount
? Show withexample
. - (Research) Why do we use
super(props)
inconstructor
? - (Research) Why
can't we have
thecallback function
ofuseEffect async
?
- Create
Class Based
Component.- Create 2
class-based child components
. Pass props
fromParent to child
.- Create a
constructor
. - Create a
state variable
inside child. - Use
this.setState
to update it. - What if there are
multiple state variables
? - Write a
console.log
for each lifecycle method. - Play with the
console logs
to find out thecorrect order of their execution
.
- Create 2
- Create
interval
insidecomponentDidMount
?- Use
clearInterval
tofix the issue
caused by theinterval
- Use