Skip to content

Commit 00f5ad6

Browse files
xcfiokodiakhq[bot]
andauthored
fix(docs): add missing createEffect and createSignal imports in lifecycle examples (#1532)
Import createEffect and createSignal in effects.mdx Added createEffect and createSignal imports to enhance component functionality. Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent a1c28e0 commit 00f5ad6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/routes/(0)concepts/(3)effects.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ This lifecycle function is similar to an effect, but it does not track any depen
159159
Rather, once the component has been initialized, the `onMount` callback will be executed and will not run again.
160160

161161
```jsx
162-
import { onMount } from "solid-js";
162+
import { onMount, createEffect, createSignal } from "solid-js";
163163

164164
function Component() {
165165
const [data, setData] = createSignal(null);
@@ -188,7 +188,7 @@ While `onMount` is useful for running a side effect once, [`onCleanup`](/referen
188188
`onCleanup` will run whenever the component unmounts, removing any subscriptions that the effect has.
189189

190190
```jsx
191-
import { onCleanup } from "solid-js";
191+
import { onCleanup, createSignal } from "solid-js";
192192

193193
function App() {
194194
const [count, setCount] = createSignal(0);

0 commit comments

Comments
 (0)