Skip to content

Commit 4c7ec23

Browse files
Merge branch 'main' into renovate/pnpm-11.x
2 parents a5d82ca + 0ac6613 commit 4c7ec23

5 files changed

Lines changed: 12 additions & 4 deletions

File tree

src/routes/(0)concepts/(1)control-flow/(0)conditional-rendering.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Solid offers dedicated components to handle conditional rendering in a more stra
2525

2626
## Show
2727

28-
`<Show>` renders its children when a condition is evaluated to be true.
28+
[`<Show>`](/reference/components/show) renders its children when a condition is evaluated to be true.
2929
Similar to the [ternary operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator) in JavaScript, it uses control logic flow within JSX to determine what to render.
3030

3131
`<Show>` has a `when` property that is used to determine whether or not to render its children.

src/routes/(0)concepts/(1)control-flow/(1)list-rendering.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ description: >-
2121

2222
List rendering allows you to generate multiple elements from a collection of data, such as an array or object, where each element corresponds to an item in the collection.
2323

24-
When dealing with dynamic data, Solid offers two ways to render lists: the `<For>` and `<Index>` components.
24+
When dealing with dynamic data, Solid offers two ways to render lists: the [`<For>`](/reference/components/for) and `<Index>` components.
2525
Both of these components help you loop over data collections to generate elements, however, they both cater to different scenarios.
2626

2727
## `<For>`

src/routes/(0)concepts/(1)control-flow/(2)dynamic.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ description: >-
1818
flexible UIs with runtime component selection.
1919
---
2020

21-
`<Dynamic>` is a Solid component that allows you to render components dynamically based on data.
21+
[`<Dynamic>`](/reference/components/dynamic) is a Solid component that allows you to render components dynamically based on data.
2222
By passing either a string representing a [native HTML element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element) or a component function to the `component` prop, you can render the chosen component with the remaining props you provide.
2323

2424
```jsx

src/routes/(0)concepts/(1)control-flow/(4)portal.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ description: >-
1919
---
2020

2121
When an element requires rendering outside of the usual document flow, challenges related to stacking contents and z-index can interfere with the desired intention or look of an application.
22-
`<Portal>` helps with this by putting elements in a different place in the document, bringing an element into the document flow so they can render as expected.
22+
[`<Portal>`](/reference/components/portal) helps with this by putting elements in a different place in the document, bringing an element into the document flow so they can render as expected.
2323

2424
```jsx
2525
import { Portal } from "solid-js/web";

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ Non-tracking function executed once on mount.
5252
- By the time `onMount` runs, refs have already been assigned.
5353
- Returning a function from `fn` does not register cleanup. Use [`onCleanup`](/reference/lifecycle/on-cleanup) inside `onMount` when cleanup is needed.
5454

55+
:::note
56+
"Mounted" in Solid refers to when a component is rendered within the reactive tree, not when it is physically inserted into the DOM.
57+
If you store JSX in a variable before conditionally rendering it, `onMount` runs when that JSX is evaluated, even if the elements have not yet been added to the visible page.
58+
Similarly, [`onCleanup`](/reference/lifecycle/on-cleanup) runs based on the reactive ownership tree rather than DOM removal.
59+
60+
For cases where you need to detect actual DOM insertion or removal, consider using a [`ref`](/concepts/refs) callback or the [Lifecycle primitives from solid-primitives](https://github.com/solidjs-community/solid-primitives/tree/main/packages/lifecycle).
61+
:::
62+
5563
## Examples
5664

5765
### Access a ref after mount

0 commit comments

Comments
 (0)