diff --git a/05-lets-get-hooked/notes.md b/05-lets-get-hooked/notes.md index 05e8b8f..b8fccf4 100644 --- a/05-lets-get-hooked/notes.md +++ b/05-lets-get-hooked/notes.md @@ -95,8 +95,9 @@ | --- | --- | | - Local Variable
`let searchText` | - Local State Variable
`const [seacrhText, setSearchText] = useState()` | | - Local Variable using default value
`let searchText = "Burger"`| - Local State Variable using default value
`const [searchText, setSearchText] = useState("Burger")` | - |- __In HTML__
`` | - __InJSX__
` setSearch(e.target.value)}/>` | + |- __In HTML__
``
`` | - __InJSX__
` setSearch(e.target.value)}/>` | +- __Syntactic events__ in React Eg: e in `(e) => e.target.value - get { useState() } from 'react'; ``` @@ -114,8 +115,6 @@ - `Two way binding` Eg: updating state & displaying updated data on the fly (reading and writing ) -- Syntactic events Eg: e in `(e) => e.target.value - - when `useState()` is used React __re-renders the whole component__ (i.e reconciliation happens & only that small portion is updated where data has changed) - ```