You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@
17
17
|8 |[What is state in React?](#what-is-state-in-react)|
18
18
|9 |[What are props in React?](#what-are-props-in-react)|
19
19
|10 |[What is the difference between state and props?](#what-is-the-difference-between-state-and-props)|
20
-
|11 |[Why should not we update the state directly?](#why-should-not-we-update-the-state-directly)|
20
+
|11 |[Why should we not update the state directly?](#why-should-we-not-update-the-state-directly)|
21
21
|12 | [What is the purpose of callback function as an argument of setState()?](#what-is-the-purpose-of-callback-function-as-an-argument-of-setstate)
22
22
|13 |[What is the difference between HTML and React event handling?](#what-is-the-difference-between-html-and-react-event-handling)|
23
23
|14 |[How to bind methods or event handlers in JSX callbacks?](#how-to-bind-methods-or-event-handlers-in-jsx-callbacks)|
@@ -440,7 +440,7 @@
440
440
441
441
Both *props* and *state* are plain JavaScript objects. While both of them hold information that influences the output of render, they are different in their functionality with respect to component. Props get passed to the component similar to function parameters whereas state is managed within the component similar to variables declared within a function.
442
442
443
-
11. ### Why should not we update the state directly?
443
+
11. ### Why should we not update the state directly?
444
444
445
445
If you try to update state directly then it won't re-render the component.
0 commit comments