0 votes
in ReactJS by
State the difference between getInitialState() and constructor()?

1 Answer

0 votes
by
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.’

Related questions

0 votes
asked Apr 21, 2022 in Scala Constructs by sharadyadav1986
0 votes
asked Mar 30, 2020 in ReactJS by amita rallin
...