diff options
Diffstat (limited to 'src/notes')
-rw-r--r-- | src/notes/state.notes.svelte | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/notes/state.notes.svelte b/src/notes/state.notes.svelte new file mode 100644 index 0000000..bde0f65 --- /dev/null +++ b/src/notes/state.notes.svelte @@ -0,0 +1,38 @@ +<script lang="ts"> + import { Notes } from '@components' +</script> +<Notes> + <ul> + <li> + useState hooks allows to have state variable inside a FUNCTIONAL COMPONENT + </li> + <li> + useState ENCAPSULATES only a single value + </li> + <li> + For mulatiple values you may need to call multiple useState's + </li> + <li> + useState arguments + <ul> + <li> + Initialization of a state variable + </li> + <li> + Passing function as initial value - to calculate an initial value + </li> + </ul> + </li> + <li> + Managing multiple states + <ul> + <li> + Multi-variable's + </li> + <li> + Object as value + </li> + </ul> + </li> + </ul> +</Notes>
\ No newline at end of file |