diff --git a/src/routes/(0)concepts/(3)effects.mdx b/src/routes/(0)concepts/(3)effects.mdx index 5f72e0d46..26283d3d8 100644 --- a/src/routes/(0)concepts/(3)effects.mdx +++ b/src/routes/(0)concepts/(3)effects.mdx @@ -159,7 +159,7 @@ This lifecycle function is similar to an effect, but it does not track any depen Rather, once the component has been initialized, the `onMount` callback will be executed and will not run again. ```jsx -import { onMount } from "solid-js"; +import { onMount, createEffect, createSignal } from "solid-js"; function Component() { const [data, setData] = createSignal(null); @@ -188,7 +188,7 @@ While `onMount` is useful for running a side effect once, [`onCleanup`](/referen `onCleanup` will run whenever the component unmounts, removing any subscriptions that the effect has. ```jsx -import { onCleanup } from "solid-js"; +import { onCleanup, createSignal } from "solid-js"; function App() { const [count, setCount] = createSignal(0);