DEV Community

Discussion on: Understanding Svelte's $: (dollar label) syntax

Collapse
vikbert profile image
Xun Zhou

the dollar label is actually similar to the react: useEffect(() => {}, [my_variable]); the code in the dollar block will be run:

  • if rerendered
  • if the state variable "my_variable" is changed