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 @@
+
+
+
+ -
+ useState hooks allows to have state variable inside a FUNCTIONAL COMPONENT
+
+ -
+ useState ENCAPSULATES only a single value
+
+ -
+ For mulatiple values you may need to call multiple useState's
+
+ -
+ useState arguments
+
+ -
+ Initialization of a state variable
+
+ -
+ Passing function as initial value - to calculate an initial value
+
+
+
+ -
+ Managing multiple states
+
+ -
+ Multi-variable's
+
+ -
+ Object as value
+
+
+
+
+
\ No newline at end of file
--
cgit v1.2.3