Skip to content

Commit 3e264be

Browse files
davedbasekodiakhq[bot]
authored andcommitted
Documentation metadata via Frontmatter (#1321)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent 91c9178 commit 3e264be

File tree

205 files changed

+1219
-2133
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

205 files changed

+1219
-2133
lines changed

src/routes/concepts/components/props.mdx

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
---
22
title: Props
33
use_cases: >-
4-
passing data between components, parent-child communication, component
5-
configuration, default values, prop management
4+
passing data between components, component communication, reusable components,
5+
parent-child data flow
66
tags:
77
- props
8-
- components
9-
- data
10-
- communication
11-
- mergeprops
12-
- splitprops
8+
- component-communication
9+
- data-flow
10+
- reusability
11+
- merge-props
12+
- split-props
1313
version: '1.0'
14-
description: >-
15-
Pass and manage component props in Solid while maintaining reactivity. Learn
16-
mergeProps, splitProps, and best practices.
1714
---
1815

1916
Props are a way to pass state from a parent component to a child component.

src/routes/concepts/context.mdx

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,16 @@
22
title: Context
33
order: 5
44
use_cases: >-
5-
global state management, avoiding prop drilling, theme providers,
6-
authentication state, shared data across components
5+
avoiding prop drilling, global state, theme management, authentication state,
6+
deeply nested components
77
tags:
88
- context
9-
- state
10-
- global
11-
- providers
12-
- sharing
13-
- management
9+
- global-state
10+
- prop-drilling
11+
- state-management
12+
- provider-pattern
13+
- theming
1414
version: '1.0'
15-
description: >-
16-
Share data across component trees with Solid's Context API. Avoid prop
17-
drilling and manage global application state effectively.
1815
---
1916

2017
Context provides a way to pass data through the component tree without having to pass props down manually at every level.

src/routes/concepts/control-flow/conditional-rendering.mdx

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,16 @@
22
title: Conditional rendering
33
order: 1
44
use_cases: >-
5-
showing/hiding content, loading states, error displays, user permissions,
6-
dynamic ui, feature toggles
5+
showing hiding content, loading states, error states, user permissions,
6+
dynamic ui
77
tags:
8-
- conditional
9-
- rendering
8+
- conditional-rendering
9+
- loading-states
10+
- error-handling
11+
- dynamic-ui
1012
- show
11-
- switch
12-
- match
13-
- ui
13+
- switch-match
1414
version: '1.0'
15-
description: >-
16-
Conditionally render UI elements in Solid using Show, Switch, and Match
17-
components for clean, readable conditional logic.
1815
---
1916

2017
Conditional rendering is the process of displaying different UI elements based on certain conditions.

src/routes/concepts/control-flow/dynamic.mdx

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,15 @@
22
title: Dynamic
33
order: 2
44
use_cases: >-
5-
dynamic component selection, polymorphic components, runtime component
6-
switching, flexible ui rendering, component factories
5+
dynamic component rendering, component switching, plugin systems, cms content,
6+
configurable ui
77
tags:
8-
- dynamic
9-
- components
10-
- rendering
11-
- polymorphic
12-
- runtime
13-
- flexible
8+
- dynamic-components
9+
- component-switching
10+
- configurable-ui
11+
- cms
12+
- plugin-systems
1413
version: '1.0'
15-
description: >-
16-
Render components dynamically at runtime with Solid's Dynamic component. Build
17-
flexible UIs with runtime component selection.
1814
---
1915

2016
`<Dynamic>` is a Solid component that allows you to render components dynamically based on data.

src/routes/concepts/control-flow/error-boundary.mdx

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,15 @@
22
title: Error boundary
33
order: 5
44
use_cases: >-
5-
error handling, crash prevention, user-friendly errors, app stability, error
6-
recovery, debugging production issues
5+
error handling, preventing app crashes, user experience, graceful degradation,
6+
error recovery
77
tags:
8-
- errors
9-
- boundary
10-
- handling
11-
- recovery
12-
- stability
13-
- debugging
8+
- error-handling
9+
- error-boundary
10+
- crash-prevention
11+
- user-experience
12+
- error-recovery
1413
version: '1.0'
15-
description: >-
16-
Catch and handle rendering errors gracefully with ErrorBoundary. Prevent app
17-
crashes and provide user-friendly error recovery.
1814
---
1915

2016
By default, if part of an application throws an error during rendering, the entire application can crash, resulting in Solid removing its UI from the screen.

src/routes/concepts/control-flow/list-rendering.mdx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,17 @@
22
title: List rendering
33
order: 3
44
use_cases: >-
5-
rendering arrays, dynamic lists, data iteration, tables, repeating elements,
6-
collection display, performance optimization
5+
displaying arrays, dynamic lists, table data, todo lists, data visualization,
6+
performance optimization
77
tags:
88
- lists
99
- arrays
10-
- for
11-
- index
1210
- iteration
13-
- rendering
1411
- performance
12+
- for-component
13+
- index-component
14+
- dynamic-data
1515
version: '1.0'
16-
description: >-
17-
Efficiently render dynamic lists in Solid using For and Index components.
18-
Optimize performance for different data scenarios.
1916
---
2017

2118
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.

src/routes/concepts/control-flow/portal.mdx

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,18 @@
22
title: Portal
33
order: 3
44
use_cases: >-
5-
modals, popups, tooltips, dropdowns, z-index issues, overflow clipping,
6-
rendering outside parent container
5+
modals, tooltips, dropdowns, popups, overlays, z-index issues, clipped
6+
content, accessibility improvements
77
tags:
8-
- portal
9-
- modal
10-
- popup
8+
- modals
9+
- tooltips
10+
- dropdowns
11+
- popups
12+
- overlays
13+
- accessibility
1114
- dom
12-
- z-index
13-
- overflow
15+
- positioning
1416
version: '1.0'
15-
description: >-
16-
Learn how Portal renders elements outside the normal DOM flow to solve z-index
17-
and overflow issues for modals and popups.
1817
---
1918

2019
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.

src/routes/concepts/derived-values/derived-signals.mdx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,16 @@
22
title: Derived signals
33
order: 1
44
use_cases: >-
5-
computed values, reactive calculations, dependent state, dynamic values from
6-
signals
5+
computed values, reactive calculations, dependent state, always, any solid
6+
project, data transformations
77
tags:
8-
- signals
98
- reactivity
10-
- derived
119
- computed
12-
- state
10+
- derived
11+
- calculations
12+
- dependencies
13+
- always
1314
version: '1.0'
14-
description: >-
15-
Create reactive derived values that automatically update when their
16-
dependencies change using Solid's derived signals.
1715
---
1816

1917
Derived signals are functions that rely on one or more [signals](/concepts/signals) to produce a value.

src/routes/concepts/derived-values/memos.mdx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,16 @@
22
title: Memos
33
order: 2
44
use_cases: >-
5-
expensive computations, caching results, optimizing performance, derived
6-
state, avoiding re-calculations
5+
expensive computations, caching, performance optimization, derived state,
6+
preventing unnecessary recalculations
77
tags:
8-
- memo
98
- performance
10-
- caching
119
- optimization
10+
- caching
11+
- expensive-computations
12+
- derived
1213
- reactivity
13-
- computed
1414
version: '1.0'
15-
description: >-
16-
Optimize expensive computations with memos that cache results and only
17-
recalculate when dependencies actually change.
1815
---
1916

2017
Memos are a type of reactive value that can be used to memoize derived state or expensive computations.

src/routes/concepts/effects.mdx

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,16 @@
22
title: Effects
33
order: 4
44
use_cases: >-
5-
side effects, dom manipulation, api calls, subscriptions, logging, reacting to
6-
state changes
5+
side effects, dom manipulation, data fetching, subscriptions, cleanup,
6+
lifecycle management, logging
77
tags:
8-
- effects
98
- side-effects
10-
- reactivity
119
- lifecycle
10+
- data-fetching
11+
- dom-manipulation
12+
- cleanup
1213
- subscriptions
1314
version: '1.0'
14-
description: >-
15-
Manage side effects like DOM updates, API calls, and subscriptions that
16-
respond automatically to reactive state changes.
1715
---
1816

1917
Effects are functions that are triggered when the signals they depend on change.
@@ -37,12 +35,6 @@ createEffect(() => {
3735
In this example, an effect is created that logs the current value of `count` to the console.
3836
When the value of `count` changes, the effect is triggered, causing it to run again and log the new value of `count`.
3937

40-
:::note
41-
Effects are primarily intended for handling side effects that do not write to the reactive system.
42-
It's best to avoid setting signals within effects, as this can lead to additional rendering or even infinite loops if not managed carefully.
43-
Instead, it is recommended to use [createMemo](/reference/basic-reactivity/create-memo) to compute new values that rely on other reactive values.
44-
:::
45-
4638
## Managing dependencies
4739

4840
Effects can be set to observe any number of dependencies.

0 commit comments

Comments
 (0)