Sitemap
JavaScript in Plain English

New JavaScript and Web Development content every day. Follow to join our 3.5M+ monthly readers.

Follow publication

Member-only story

Lifecycle of the Svelte Component

2 min readApr 17, 2020
Logo of the Svelte

This post is one of Svelte Tutorial series.

  1. Up and running with Svelte
  2. How to handle Events in Svelte
  3. How binding data into Svelte Component
  4. [This Post] Lifecycle of the Svelte Component

LifeCycle Functions

The svelte has some lifecycle functions.

Lifecycle of the Svelte Component
  1. onMount: runs after the component is first rendered to the DOM.
  2. onDestroy: runs when the component is destroyed.
  3. beforeUpdate: runs before the DOM has been updated.
  4. afterUpdate: runs after the DOM has been updated(It's counterpart of the beforeUpdate).
  5. tick: unlike other functions(I'll describe at the last part of this post).

LifeCycle

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

JavaScript in Plain English
JavaScript in Plain English

Published in JavaScript in Plain English

New JavaScript and Web Development content every day. Follow to join our 3.5M+ monthly readers.

Jangwook Kim
Jangwook Kim

Written by Jangwook Kim

Korean, live in Japan. The programmer. I love to learn something new things. I’m publishing my toy projects using GitHub. Visit https://www.jangwook.net.

No responses yet

Write a response