Skip to content

Fix broken highlights #1169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions src/routes/reference/reactive-utilities/untrack.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function Component(props) {
It is not necessary to manually untrack values that are suppose to serve as a default or initial value to a signal. Even with the linter configured to enforce tracking, the linter will accept it when a `prop` is prefixed with `default` or `initial` as it is a common pattern to use them as such.


```tsx tab title="initialValue" {4}
```tsx tab title="initialValue" {5}
// component.tsx
import { createSignal } from "solid-js"

Expand All @@ -32,7 +32,7 @@ export function Component(props) {
}
```

```tsx tab title="defaultValue" {4}
```tsx tab title="defaultValue" {5}
// component.tsx
import { createSignal } from "solid-js"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ When the form is submitted, the `submission` object will be updated with the new
This allows you to provide feedback to the user that the action is in progress.
Once the action is complete, the `pending` property will be set to `false` and the `result` property will be updated with final value.

```tsx tab title="TypeScript" {5,12-19}
```tsx tab title="TypeScript" {6,13-20}
// component.tsx
import { Show } from "solid-js";
import { useSubmissions } from "@solidjs/router";
Expand Down Expand Up @@ -122,7 +122,7 @@ function Component() {
}
```

```tsx tab title="JavaScript" {5,12-19}
```tsx tab title="JavaScript" {6,13-20}
// component.jsx
import { Show } from "solid-js";
import { useSubmissions } from "@solidjs/router";
Expand Down
24 changes: 12 additions & 12 deletions src/routes/solid-start/guides/data-fetching.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ To show a loading UI during data-fetching:
1. Import [`Suspense`](/reference/components/suspense) from `solid-js`.
2. Wrap your data rendering in `<Suspense>`, and use the `fallback` prop to show a component during data fetching.

```tsx tab title="TypeScript" {13} {15}
```tsx tab title="TypeScript" {14} {16}
// src/routes/index.tsx
import { Suspense, For } from "solid-js";
import { query, createAsync } from "@solidjs/router";
Expand All @@ -86,7 +86,7 @@ export default function Page() {
}
```

```jsx tab title="JavaScript" {13} {15}
```jsx tab title="JavaScript" {14} {16}
// src/routes/index.jsx
import { Suspense, For } from "solid-js";
import { query, createAsync } from "@solidjs/router";
Expand Down Expand Up @@ -115,7 +115,7 @@ To show a fallback UI if the data-fetching fails:
1. Import [`ErrorBoundary`](/reference/components/error-boundary) from `solid-js`.
2. Wrap the data rendering in `<ErrorBoundary>`, and use the `fallback` prop to show a component if an error occurs.

```tsx tab title="TypeScript" {13} {17}
```tsx tab title="TypeScript" {14} {18}
// src/routes/index.tsx
import { ErrorBoundary, Suspense, For } from "solid-js";
import { query, createAsync } from "@solidjs/router";
Expand All @@ -139,7 +139,7 @@ export default function Page() {
}
```

```jsx tab title="JavaScript" {13} {17}
```jsx tab title="JavaScript" {14} {18}
// src/routes/index.jsx
import { ErrorBoundary, Suspense, For } from "solid-js";
import { query, createAsync } from "@solidjs/router";
Expand Down Expand Up @@ -171,7 +171,7 @@ Data fetching can be optimized during user navigation by preloading the data:
2. Run your query inside the `preload` function.
3. Use the query as usual in your component.

```tsx tab title="TypeScript" {9-11}
```tsx tab title="TypeScript" {10-12}
// src/routes/index.tsx
import { ErrorBoundary } from "solid-js";
import { query, createAsync, type RouteDefinition } from "@solidjs/router";
Expand All @@ -197,7 +197,7 @@ export default function Page() {
}
```

```jsx tab title="JavaScript" {9-11}
```jsx tab title="JavaScript" {10-12}
// src/routes/index.jsx
import { ErrorBoundary } from "solid-js";
import { query, createAsync } from "@solidjs/router";
Expand Down Expand Up @@ -227,7 +227,7 @@ export default function Page() {

When creating a query that accepts parameters, define your query function to take any number of arguments:

```tsx tab title="TypeScript" {4} {10} {15}
```tsx tab title="TypeScript" {5} {11} {16}
// src/routes/posts/[id]/index.tsx
import { ErrorBoundary } from "solid-js";
import { query, createAsync, type RouteDefinition } from "@solidjs/router";
Expand All @@ -254,7 +254,7 @@ export default function Page() {
}
```

```jsx tab title="JavaScript" {4} {10} {15}
```jsx tab title="JavaScript" {5} {11} {16}
// src/routes/posts/[id]/index.jsx
import { ErrorBoundary } from "solid-js";
import { query, createAsync } from "@solidjs/router";
Expand Down Expand Up @@ -285,7 +285,7 @@ export default function Page() {

To safely interact with your database or ORM in a query, ensure it's server-only by adding [`"use server"`](/solid-start/reference/server/use-server) as the first line of your query:

```tsx tab title="TypeScript" {6-7}
```tsx tab title="TypeScript" {7-8}
// src/routes/index.tsx
import { For, ErrorBoundary } from "solid-js";
import { query, createAsync, type RouteDefinition } from "@solidjs/router";
Expand All @@ -312,7 +312,7 @@ export default function Page() {
}
```

```jsx tab title="JavaScript" {6-7}
```jsx tab title="JavaScript" {7-8}
// src/routes/index.jsx
import { For, ErrorBoundary } from "solid-js";
import { query, createAsync } from "@solidjs/router";
Expand Down Expand Up @@ -343,7 +343,7 @@ export default function Page() {

To fetch data only on the client, use the [`createResource`](/reference/basic-reactivity/create-resource) primitive:

```tsx tab title="TypeScript" {4-7}
```tsx tab title="TypeScript" {5-8} {13}
// src/routes/index.tsx
import { createResource, ErrorBoundary, Suspense, For } from "solid-js";

Expand All @@ -364,7 +364,7 @@ export default function Page() {
}
```

```jsx tab title="JavaScript" {4-7}
```jsx tab title="JavaScript" {5-8} {13}
// src/routes/index.jsx
import { createResource, ErrorBoundary, Suspense, For } from "solid-js";

Expand Down
4 changes: 2 additions & 2 deletions src/routes/solid-start/guides/data-mutation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default function Page() {

To pass additional arguments to your action, use the `with` method:

```tsx tab title="TypeScript" {15}
```tsx tab title="TypeScript" {4} {15}
// src/routes/index.tsx
import { action } from "@solidjs/router";

Expand All @@ -85,7 +85,7 @@ export default function Page() {
}
```

```jsx tab title="JavaScript" {15}
```jsx tab title="JavaScript" {4} {15}
// src/routes/index.jsx
import { action } from "@solidjs/router";

Expand Down
2 changes: 1 addition & 1 deletion src/routes/solid-start/guides/security.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default createMiddleware({
});
```

```tsx tab title="entry-server.tsx" {6}
```tsx tab title="entry-server.tsx" {7}
// src/entry-server.tsx
// @refresh reload
import { createHandler, StartServer } from "@solidjs/start/server";
Expand Down