From ebb535b7406837fbb1b1bc07b09aa4e8991f4005 Mon Sep 17 00:00:00 2001
From: Indrajith K L
Date: Mon, 5 Feb 2024 04:41:32 +0530
Subject: Adds Notes and Code Examples

* Move Notes to separate file
* Adds Code Examples
---
 src/notes/state.notes.svelte | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 src/notes/state.notes.svelte

(limited to 'src/notes/state.notes.svelte')

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
-- 
cgit v1.2.3

