Login
Remember
Register
Ask a Question
State the difference between getInitialState() and constructor()?
0
votes
asked
Dec 22, 2023
in
ReactJS
by
john ganales
State the difference between getInitialState() and constructor()?
constructor
getinitialstate
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Dec 22, 2023
by
john ganales
If you want to create one component by extending ‘React. Component’, the constructor helps you to initialize the State. But, if you want to create by using ‘Reat.createClass.’ then you should use ‘genInitiaState.’
...