2424 },
2525 {
2626 "definition" : " কম্পোনেন্ট স্ট্যাইল" ,
27- "code" : " \n <p>This is a paragraph.</p>\n <style>\n p {\n\t color : purple; \n } \n </style>"
27+ "code" : " \n <p>This is a paragraph.</p>\n <style>\n p {\n\t color : purple;\n }\n </style>"
2828 },
2929 {
3030 "definition" : " নেস্টেড কম্পোনেন্ট" ,
5151 {
5252 "definition" : " ইভেন্ট হ্যান্ডেলার" ,
5353 "code" : [
54- " <script> \n let count = 0; \n function incrementCount() { \n count += 1; \n } \n </script>\n " ,
54+ " <script> \n let count = 0; \n function incrementCount() { \n\t count += 1; \n } \n </script>\n " ,
5555 " <button on:click={incrementCount}> Clicked {count} {count === 1 ? 'time' : 'times'}</button>"
5656 ]
5757 },
5858 {
5959 "definition" : " রিয়্যাক্টিভ অ্যাসাইনমেন্ট" ,
6060 "code" : [
61- " <script> \n let count = 0; \n $: doubled = count * 2; \n function incrementCount() { \n count += 1; \n } \n </script>\n " ,
61+ " <script> \n let count = 0; \n $: doubled = count * 2; \n function incrementCount() { \n\t count += 1; \n } \n </script>\n " ,
6262 " <button on:click={incrementCount}> Clicked {count} {count === 1 ? 'time' : 'times'}</button>\n " ,
6363 " <p>{count} doubled is {doubled}</p>"
6464 ]
164164 ]
165165 }
166166 ]
167+ },
168+ {
169+ "title" : " এসভেল্ট স্টোর" ,
170+ "items" : [{
171+ "definition" : " রাইটেবল(writable)" ,
172+ "code" : [
173+ " import { writable } from 'svelte/store';\n\n const count = writable(0);\n count.subscribe(value => {\n\t console.log(value);\n }); // logs '0'\n count.set(1);\n count.set(1); // logs '1'\n count.update(n => n + 1); // logs '2'"
174+ ]
175+ },
176+ {
177+ "definition" : " রিডেবল(readable )" ,
178+ "code" : [
179+ " import { readable } from 'svelte/store';\n const time = readable(null, set => {\n\t set(new Date());\n\t const interval = setInterval(() => {\n\t\t set(new Date());\n\t }, 1000);\n\t return () => clearInterval(interval);\n });"
180+ ]
181+ },
182+ {
183+ "definition" : " ডিরাইভড(derived)" ,
184+ "code" : [
185+ " import { derived } from 'svelte/store';\n const doubled = derived(a, $a => $a * 2);"
186+ ]
187+ },
188+ {
189+ "definition" : " গেট(get)" ,
190+ "code" : [
191+ " import { get } from 'svelte/store';\n const value = get(store);"
192+ ]
193+ }
194+ ]
167195 }
168196 ]
169197}
0 commit comments