Skip to content
Draft
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
2e619e5
start of v2 structure
LadyBluenotes Aug 24, 2025
780750c
Improve data fetching docs (#1179)
amirhhashemi Aug 26, 2025
20cf242
quick start
LadyBluenotes Aug 28, 2025
a67220a
update titles and reactivity basics page
LadyBluenotes Aug 28, 2025
2d97093
focused signals page
LadyBluenotes Aug 28, 2025
ce0da5c
understanding JSX page
LadyBluenotes Aug 28, 2025
21e2e8c
Merge branch 'main' into v2-docs
kodiakhq[bot] Aug 30, 2025
b41f22c
Merge branch 'main' into v2-docs
kodiakhq[bot] Aug 30, 2025
da9300d
Merge branch 'main' into v2-docs
kodiakhq[bot] Aug 30, 2025
aeac1e6
Merge branch 'main' into v2-docs
kodiakhq[bot] Aug 30, 2025
4d1d09d
Merge branch 'main' into v2-docs
kodiakhq[bot] Aug 30, 2025
a96251c
new files
LadyBluenotes Aug 30, 2025
8c8931b
Merge branch 'main' into v2-docs
kodiakhq[bot] Aug 30, 2025
dae6b8a
Merge branch 'main' into v2-docs
kodiakhq[bot] Aug 30, 2025
ca815ce
workign on new pages
LadyBluenotes Aug 31, 2025
b6a0505
Merge branch 'main' into v2-docs
kodiakhq[bot] Aug 31, 2025
9d5c443
Merge branch 'main' into v2-docs
kodiakhq[bot] Aug 31, 2025
8e8789d
Merge branch 'main' into v2-docs
kodiakhq[bot] Aug 31, 2025
1ba03a9
Merge branch 'main' into v2-docs
kodiakhq[bot] Sep 2, 2025
a229b75
Merge branch 'main' into v2-docs
kodiakhq[bot] Sep 2, 2025
40b4f5b
Merge branch 'main' into v2-docs
kodiakhq[bot] Sep 2, 2025
5ec20ef
Merge branch 'main' into v2-docs
kodiakhq[bot] Sep 2, 2025
41709a6
Merge branch 'main' into v2-docs
kodiakhq[bot] Sep 3, 2025
eef1c9b
Merge branch 'main' into v2-docs
kodiakhq[bot] Sep 3, 2025
736cd9a
Merge branch 'main' into v2-docs
kodiakhq[bot] Sep 3, 2025
db0956b
Merge branch 'main' into v2-docs
kodiakhq[bot] Sep 3, 2025
daf1c5c
Update src/routes/getting-started/quick-start.mdx
LadyBluenotes Sep 3, 2025
a55927a
Apply suggestions from code review
LadyBluenotes Sep 3, 2025
0f5f21b
effects
LadyBluenotes Sep 17, 2025
e773cb2
Closes issues #649 and #968 (#1251)
thomasbuilds Sep 7, 2025
348aea9
Addresses Issue #1183 (#1252)
thomasbuilds Sep 8, 2025
832a918
Bump @types/node from 24.3.0 to 24.3.1 (#1254)
dependabot[bot] Sep 8, 2025
a297414
Bump eslint from 9.34.0 to 9.35.0 (#1256)
dependabot[bot] Sep 8, 2025
8e5abe9
Bump dotenv from 17.2.1 to 17.2.2 (#1255)
dependabot[bot] Sep 8, 2025
62261b1
Bump @typescript-eslint/parser from 8.41.0 to 8.43.0 (#1257)
dependabot[bot] Sep 9, 2025
f066063
Bump typescript-eslint from 8.41.0 to 8.43.0 (#1258)
dependabot[bot] Sep 9, 2025
0187c05
remove random `;` symbol from splitProps docs (#1260)
JLarky Sep 11, 2025
b1e1076
Addresses #547 (#1253)
thomasbuilds Sep 12, 2025
2230518
Addressed issue #1259 (#1262)
thomasbuilds Sep 14, 2025
6677dd2
Fix code example error in create-effect.mdx (#1261)
WavJaby Sep 14, 2025
a9105fe
Bump zod from 4.1.5 to 4.1.8 (#1268)
dependabot[bot] Sep 16, 2025
c576beb
Bump @solidjs/start from 1.1.7 to 1.2.0 (#1266)
dependabot[bot] Sep 16, 2025
cce5056
Bump @eslint/js from 9.34.0 to 9.35.0 (#1265)
dependabot[bot] Sep 16, 2025
42bee6a
Bump globals from 16.3.0 to 16.4.0 (#1267)
dependabot[bot] Sep 16, 2025
2581e1b
Remove "variables" from createEffect dependency examples (#1269)
Mind-of-Apollo Sep 17, 2025
c34397b
start of v2 structure
LadyBluenotes Aug 24, 2025
8e9c161
fix broken jsx
LadyBluenotes Sep 17, 2025
795ea93
derived state section
LadyBluenotes Sep 17, 2025
741243c
working on stores page
LadyBluenotes Sep 22, 2025
4f5d07a
fix broken link:
LadyBluenotes Sep 22, 2025
01d9c0e
Bump @types/node from 24.3.1 to 24.5.0 (#1264)
dependabot[bot] Sep 17, 2025
09138ff
start of v2 structure
LadyBluenotes Aug 24, 2025
39cbee3
fix getting-started
LadyBluenotes Sep 22, 2025
673d79e
rm old component
LadyBluenotes Sep 22, 2025
bd8bfff
remove lunaria
LadyBluenotes Sep 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
96 changes: 96 additions & 0 deletions old pages/concepts/signals.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---
title: Signals
order: 2
---

Signals are the **core primitive for state** in Solid.
They provide a way to store a value, read it, and update it.
When a signal changes, anything that depends on it will update automatically.

Signals can represent any kind of state in your application:
- simple values like numbers or strings
- complex values like objects or arrays
- application state such as the current user, theme, or page

For an overview of how signals fit into Solid’s reactive model, see [Reactivity Basics](/reactivity/basics).

## Creating a signal

Use [`createSignal`](/reference/basic-reactivity/create-signal) from `solid-js` to create a signal.
It returns a pair of functions:
- a **getter** to read the value
- a **setter** to update the value

```jsx
import { createSignal } from "solid-js";

const [count, setCount] = createSignal(0);
// ^ getter ^ setter
```

:::note
The syntax using `[` and `]` is called [array destructuring](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment).

This lets you extract values from the array.
In the context of `createSignal`, the first value is the getter function, and the second value is the setter function.
:::

## Accessing values

The getter function returned by `createSignal` is used to access the value of the signal.
Call the getter function with no arguments to read the current value:

```jsx
console.log(count()); // 0
```

## Updating values

The setter function returned by `createSignal` is used to update the value of the signal.
This function takes an argument that represents the new value of the signal:

```jsx
setCount(count() + 1);

console.log(count()); // 1
```

The setter function can also take a function that passes the previous value.

```jsx
setCount((prevCount) => prevCount + 1);

console.log(count()); // 1
```

## Reactivity

Signals are **reactive**, which means that they automatically update when their value changes.
For example, using a signal inside JSX automatically makes the DOM update when the signal changes:

```jsx
function Counter() {
const [count, setCount] = createSignal(0);
const increment = () => setCount((prev) => prev + 1);

return (
<div>
<span>Count: {count()}</span> {/* Updates when `count` changes */}
<button type="button" onClick={increment}>
Increment
</button>
</div>
);
}
```

To learn how signals connect to effects and tracking scopes, see:
- [Reactive Side Effects](/reactivity/effects)
- [Memoized Computations](/reactivity/memo)

## Related Pages

- [Reactivity Basics](/reactivity/basics)
- [Reactive Side Effects](/reactivity/effects)
- [Memoized Computations](/reactivity/memo)
- [Introduction to Components](/components/intro)
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions old pages/guides/data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"title": "Guides",
"pages": [
"styling-your-components.mdx",
"styling-components",
"state-management.mdx",
"routing-and-navigation.mdx",
"complex-state-management.mdx",
"fetching-data.mdx",
"testing.mdx",
"deploying-your-app.mdx",
"deployment-options"
]
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "solid-docs-next",
"version": "1.0.0",
"version": "2.0.0",
"private": true,
"description": "Docs for Solid",
"type": "module",
Expand Down
2 changes: 2 additions & 0 deletions src/middleware/legacy-routes-redirect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ const LEGACY_ROUTES = {

"/solid-router/reference/response-helpers/revalidate":
"/solid-router/reference/data-apis/revalidate",

"/solid-start/guides/data-loading": "/solid-start/guides/data-fetching",
} as const;

function isLegacyRoute(path: string): path is keyof typeof LEGACY_ROUTES {
Expand Down
4 changes: 4 additions & 0 deletions src/routes/advanced/data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"title": "Advanced Concepts",
"pages": []
}
4 changes: 4 additions & 0 deletions src/routes/components/data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"title": "Components",
"pages": ["intro.md", "how-to"]
}
4 changes: 4 additions & 0 deletions src/routes/components/how-to/data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"title": "How-to",
"pages": ["event-listeners.mdx", "styling.mdx"]
}
4 changes: 4 additions & 0 deletions src/routes/components/how-to/event-listeners.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: "Using Event Listeners"
---

4 changes: 4 additions & 0 deletions src/routes/components/how-to/styling.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: "Styling Components"
---

10 changes: 10 additions & 0 deletions src/routes/components/intro.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: "Intro to Components"
order: 1
---

[TODO]

## Component lifecycle

[TODO]
90 changes: 0 additions & 90 deletions src/routes/concepts/signals.mdx

This file was deleted.

4 changes: 4 additions & 0 deletions src/routes/control-flow/data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"title": "Control Flow",
"pages": []
}
13 changes: 8 additions & 5 deletions src/routes/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
"title": "root",
"pages": [
"index.mdx",
"quick-start.mdx",
"concepts",
"advanced-concepts",
"guides",
"configuration"
"intro.mdx",
"getting-started",
"reactivity",
"components",
"control-flow",
"rendering",
"advanced",
"guides"
]
}
4 changes: 4 additions & 0 deletions src/routes/getting-started/data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"title": "Getting Started",
"pages": ["quick-start.mdx", "counter.mdx", "todo.mdx"]
}
83 changes: 83 additions & 0 deletions src/routes/getting-started/quick-start.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
title: Quick Start
order: 1
---

The fastest way to try Solid is to create a new project and run it locally.
In just a few minutes, you’ll have a working Solid app running in your browser.

## Solid in your Browser

If you're looking to experiment with Solid without setting up a local environment, open the [Solid Playground](https://playground.solidjs.com/) in your browser.

If you prefer a more complete development setup, you can use the StackBlitz [Javascript](https://stackblitz.com/github/solidjs/templates/tree/master/js) or [TypeScript](https://stackblitz.com/github/solidjs/templates/tree/master/ts) templates.

## Create a New Project

:::note[Before You Begin]
Make sure you have a recent version of your preferred JavaScript runtime installed, such as [Node.js](https://nodejs.org/en), [Bun](https://bun.sh/), or [Deno](https://deno.com/).
:::

To create a new Solid project, follow these steps:

1. **Open your terminal and navigate to the directory** where you want to create your project.

2. **Run the following command:**

```package-create
solid
```

3. **Follow the CLI prompts** to select your project name, template (JavaScript or TypeScript), and other options.

```sh
◆ Project Name
| <solid-project>

◆ Is this a SolidStart project?
| ● Yes / ○ No

◆ Which template would you like to use?
│ ● ts
│ ○ ts-vitest
│ ○ ts-uvu
│ ○ ts-unocss
│ ○ ts-tailwindcss

◆ Use TypeScript?
│ ● Yes / ○ No
```

4. **Follow the instructions to install the dependencies and start the development server:**

```sh title="npm" tab="package-manager"
cd solid-project
npm install
npm run dev
```

```sh title="pnpm" tab="package-manager"
cd solid-project
pnpm install
pnpm dev
```

```sh title="yarn" tab="package-manager"
cd solid-project
yarn install
yarn dev
```

```sh title="bun" tab="package-manager"
cd solid-project
bun install
bun run dev
```

```sh title="deno" tab="package-manager"
cd solid-project
deno install
deno run dev
```

6. **Open your browser and go to the local URL** provided in the terminal to see your new Solid app in action!
15 changes: 15 additions & 0 deletions src/routes/getting-started/todo.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Todo Tutorial
order: 3
---

[TODO]

1. Open your newly scaffolded project in your code editor of choice.

- Signal to track all tasks
- Function to add a new task
- Function to remove a task
- Function to toggle task completion
- Show number of completed tasks
- Show number of tasks
Loading