From 5e41a9350e603c7cc3a7d878419bd5e5eccd68a2 Mon Sep 17 00:00:00 2001 From: zeref31 <88417235+zeref31@users.noreply.github.com> Date: Mon, 1 May 2023 11:32:05 +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..d92efec 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 the state used to be 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.