Skip to content

Commit e91f751

Browse files
authoredJul 17, 2023
docs: Use svelte for prismjs codeblocks (#5727)
1 parent 5314cfb commit e91f751

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed
 

‎docs/svelte/overview.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The `@tanstack/svelte-query` package offers a 1st-class API for using TanStack Q
99

1010
Include the QueryClientProvider near the root of your project:
1111

12-
```markdown
12+
```svelte
1313
<script lang="ts">
1414
import { QueryClient, QueryClientProvider } from '@tanstack/svelte-query'
1515
import Example from './lib/Example.svelte'
@@ -24,7 +24,7 @@ Include the QueryClientProvider near the root of your project:
2424

2525
Then call any function (e.g. createQuery) from any component:
2626

27-
```markdown
27+
```svelte
2828
<script lang="ts">
2929
import { createQuery } from '@tanstack/svelte-query'
3030

‎docs/svelte/reactivity.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Svelte uses a compiler to build your code which optimises rendering. By default,
77

88
In the below example, the `refetchInterval` option is set from the variable `intervalMs`, which is edited by the input field. However, as the query is not told it should react to changes in `intervalMs`, `refetchInterval` will not change when the input value changes.
99

10-
```markdown
10+
```svelte
1111
<script lang="ts">
1212
import { createQuery } from '@tanstack/svelte-query'
1313
@@ -27,7 +27,7 @@ In the below example, the `refetchInterval` option is set from the variable `int
2727

2828
To solve this, you can prefix the query with `$: ` to tell the compiler it should be reactive.
2929

30-
```markdown
30+
```svelte
3131
<script lang="ts">
3232
import { createQuery } from '@tanstack/svelte-query'
3333

‎docs/svelte/ssr.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The recommended way to achieve this is to use the `browser` module from SvelteKi
1111

1212
**src/routes/+layout.svelte**
1313

14-
```markdown
14+
```svelte
1515
<script lang="ts">
1616
import { browser } from '$app/environment'
1717
import { QueryClient, QueryClientProvider } from '@tanstack/svelte-query'
@@ -52,7 +52,7 @@ export const load: PageLoad = async () => {
5252
```
5353

5454
**src/routes/+page.svelte**
55-
```markdown
55+
```svelte
5656
<script>
5757
import { createQuery } from '@tanstack/svelte-query'
5858
import type { PageData } from './$types'
@@ -104,7 +104,7 @@ export const load: LayoutLoad = async () => {
104104

105105
**src/routes/+layout.svelte**
106106

107-
```markdown
107+
```svelte
108108
<script lang="ts">
109109
import { QueryClientProvider } from '@tanstack/svelte-query'
110110
import type { LayoutData } from './$types'
@@ -135,7 +135,7 @@ export const load: PageLoad = async ({ parent, fetch }) => {
135135

136136
**src/routes/+page.svelte**
137137

138-
```markdown
138+
```svelte
139139
<script lang="ts">
140140
import { createQuery } from '@tanstack/svelte-query'
141141

0 commit comments

Comments
 (0)
Please sign in to comment.