Skip to content

Commit

Permalink
Update notes.md
Browse files Browse the repository at this point in the history
  • Loading branch information
deltanode authored Mar 15, 2023
1 parent 01b956b commit 1e9c11d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions 05-lets-get-hooked/notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@
| --- | --- |
| - Local Variable <br>`let searchText` | - Local State Variable <br> `const [seacrhText, setSearchText] = useState()` |
| - Local Variable using default value <br> `let searchText = "Burger"`| - Local State Variable using default value <br> `const [searchText, setSearchText] = useState("Burger")` |
|- __In HTML__ <br> `<input type="text" onchange="fun()"/>` | - __InJSX__ <br> `<input type="text" onChange={e => setSearch(e.target.value)}/>` |
|- __In HTML__ <br> `<input type="text" onchange="fun()"/>` <br> `<script>` <br> `fun(e){ searchText = e.target.value}`<br> `</script>` | - __InJSX__ <br> `<input type="text" onChange={e => setSearch(e.target.value)}/>` |
- __Syntactic events__ in React Eg: e in `(e) => e.target.value
- get { useState() } from 'react';
```
Expand All @@ -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)
- ```
Expand Down

0 comments on commit 1e9c11d

Please sign in to comment.