Skip to content

Commit f14b7f8

Browse files
Merge branch 'main' into fix-orama-link
2 parents f4ca257 + 2abcfb2 commit f14b7f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/routes/concepts/refs.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,14 @@ This is useful when you want to access the element directly, but the element may
7979
```jsx
8080
function App() {
8181
const [show, setShow] = createSignal(false)
82-
const [element, setElement] = createSignal()
82+
let element!: HTMLParagraphElement
8383

8484
return (
8585
<div>
8686
<button onClick={() => setShow((isShown) => !isShown)}>Toggle</button>
8787

8888
<Show when={show()}>
89-
<p ref={setElement}>This is the ref element</p>
89+
<p ref={element}>This is the ref element</p>
9090
</Show>
9191
</div>
9292
)

0 commit comments

Comments
 (0)