Jatin Hemnani wrote
onMount Lifecycle In Svelte – Code example
What Is Lifecycle? Every component has a Lifecycle that starts when it is created. Sometimes we need a function to run when the component is rendered like fetching APIs. Import onMount Here we have imported the onMount lifecycle and created an empty array. Using onMount Above we have fetched the API and assigned it to […]
February 19, 2021 in Code examples