From 5fa76429550586f7fd18a8f45069eda8a9a6951b Mon Sep 17 00:00:00 2001 From: Ananthu Ajay <44108056+AnanthuAjay@users.noreply.github.com> Date: Sat, 20 Aug 2022 22:33:21 +0530 Subject: [PATCH] Update 14_component_life_cycles.md --- 14_Day_Component_Life_Cycles/14_component_life_cycles.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/14_Day_Component_Life_Cycles/14_component_life_cycles.md b/14_Day_Component_Life_Cycles/14_component_life_cycles.md index fb00594..da1b1cf 100644 --- a/14_Day_Component_Life_Cycles/14_component_life_cycles.md +++ b/14_Day_Component_Life_Cycles/14_component_life_cycles.md @@ -97,7 +97,7 @@ ReactDOM.render(, rootElement) ### Contructor -Nowadays we write class based-component without a constructor and we can write the state also outside the constructor. In older version React we the state used be always inside the constructor. +Nowadays we write class based-component without a constructor and we can write the state also outside the constructor. In older version React we wrote the state used be always inside the constructor. The constructor() method is executed before any other methods, when component is initiated and it is the place where to set the initial state and other values. In class we use constructor parameter to inherit from parents and in React to the constructor take a props parameter and the super method has to be also called.