Skip to content

Commit 4ccc007

Browse files
authored
Fixing onMount doc page; typo, incomplete sentence, wrong element type (#816)
1 parent 1dc5611 commit 4ccc007

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/routes/reference/lifecycle/on-mount.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ order: 5
44
---
55

66
Registers a method that runs after initial rendering is done and the elements are mounted to the page.
7-
Ideal for using [refs](/reference/jsx-attributes/ref) and managing other one-time setup that requires the
7+
Ideal for using [refs](/reference/jsx-attributes/ref) and managing other one-time setup.
88

99
```tsx
1010
import { onMount } from "solid-js"
@@ -16,11 +16,11 @@ function onMount(fn: () => void): void
1616
This is an alias for an effect that is non-tracking, meaning that it is equivalent to a [`createEffect`](/reference/basic-reactivity/create-effect) with no dependencies.
1717

1818
```tsx
19-
// example that shoes how to use onMount to get a ref to an element
19+
// example that shows how to use onMount to get a reference to an element
2020
import { onMount } from "solid-js"
2121

2222
function MyComponent() {
23-
let ref: HTMLDivElement
23+
let ref: HTMLButtonElement
2424

2525
// when the component is mounted, the button will be disabled
2626
onMount(() => {

0 commit comments

Comments
 (0)