Skip to content

Commit 4b146ef

Browse files
committed
docs(package name): use @SvelteStack instead of @TanStack
1 parent e07efb0 commit 4b146ef

27 files changed

+39
-38
lines changed

docs/src/pages/guides/background-fetching-indicators.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ A query's `status === 'loading'` state is sufficient enough to show the initial
77

88
```markdown
99
<script>
10-
import { useQuery } from '@tanstack/svelte-query';
10+
import { useQuery } from '@sveltestack/svelte-query';
1111

1212
const queryResult = useQuery('todos', fetchTodos)
1313
</script>
@@ -32,7 +32,7 @@ In addition to individual query loading states, if you would like to show a glob
3232

3333
```markdown
3434
<script>
35-
import { useIsFetching } from '@tanstack/svelte-query'
35+
import { useIsFetching } from '@sveltestack/svelte-query'
3636

3737
const isFetching = useIsFetching()
3838
</script>

docs/src/pages/guides/default-query-function.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ If you find yourself wishing for whatever reason that you could just share the s
77

88
```markdown
99
<script>
10-
import { QueryClientProvider } from '@tanstack/svelte-query';
10+
import { QueryClientProvider } from '@sveltestack/svelte-query';
1111
// Define a default query function that will receive the query key
1212
const defaultQueryFn = async ({ queryKey }) => {
1313
const { data } = await axios.get(`https://jsonplaceholder.typicode.com${queryKey[0]}`)

docs/src/pages/guides/infinite-queries.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ With this information, we can create a "Load More" UI by:
4141
4242
```markdown
4343
<script>
44-
import { useInfiniteQuery } from '@tanstack/svelte-query'
44+
import { useInfiniteQuery } from '@sveltestack/svelte-query'
4545

4646
const fetchProjects = async ({ pageParam = 0 }) => {
4747
const { data } = await axios.get(`/projects?cursor=${pageParam}`)
@@ -90,7 +90,7 @@ By default, the variable returned from `getNextPageParam` will be supplied to th
9090

9191
```markdown
9292
<script>
93-
import { useInfiniteQuery } from '@tanstack/svelte-query'
93+
import { useInfiniteQuery } from '@sveltestack/svelte-query'
9494

9595
const fetchProjects = async ({ pageParam = 0 }) => {
9696
const { data } = await axios.get(`/projects?cursor=${pageParam}`)

docs/src/pages/guides/invalidations-from-mutations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const mutation = useMutation(postTodo)
1414
When a successful `postTodo` mutation happens, we likely want all `todos` queries to get invalidated and possibly refetched to show the new todo item. To do this, you can use `useMutation`'s `onSuccess` options and the `client`'s `invalidateQueries` function:
1515

1616
```js
17-
import { useMutation, useQueryClient } from '@tanstack/svelte-query'
17+
import { useMutation, useQueryClient } from '@sveltestack/svelte-query'
1818

1919
const queryClient = useQueryClient()
2020

docs/src/pages/guides/mutations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Here's an example of a mutation that adds a new todo the server:
99

1010
```markdown
1111
<script>
12-
import { useMutation } from '@tanstack/svelte-query'
12+
import { useMutation } from '@sveltestack/svelte-query'
1313

1414
const mutation = useMutation(newTodo => axios.post('/todos', newTodo))
1515
</script>

docs/src/pages/guides/queries.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ To subscribe to a query in your components or custom hooks, call the `useQuery`
1515
- Throws an error
1616

1717
```js
18-
import { useQuery } from '@tanstack/svelte-query'
18+
import { useQuery } from '@sveltestack/svelte-query'
1919

2020
const info = useQuery('todos', fetchTodoList)
2121
```
@@ -46,7 +46,7 @@ For **most** queries, it's usually sufficient to check for the `isLoading` state
4646
```markdown
4747

4848
<script>
49-
import { useQuery } from '@tanstack/svelte-query';
49+
import { useQuery } from '@sveltestack/svelte-query';
5050

5151
const queryResult = useQuery('todos', fetchTodos)
5252
</script>
@@ -69,7 +69,7 @@ If booleans aren't your thing, you can always use the `status` state as well:
6969

7070
```markdown
7171
<script>
72-
import { useQuery } from '@tanstack/svelte-query';
72+
import { useQuery } from '@sveltestack/svelte-query';
7373

7474
const queryResult = useQuery('todos', fetchTodos)
7575
</script>

docs/src/pages/guides/query-functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function fetchTodoList({ queryKey }) {
6868
Anywhere the `[queryKey, queryFn, config]` signature is supported throughout Svelte Query's API, you can also use an object to express the same configuration:
6969

7070
```js
71-
import { useQuery } from '@tanstack/svelte-query'
71+
import { useQuery } from '@sveltestack/svelte-query'
7272

7373
useQuery({
7474
queryKey: ['todo', 7],

docs/src/pages/guides/query-invalidation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ When using APIs like `invalidateQueries` and `removeQueries` (and others that su
2626
In this example, we can use the `todos` prefix to invalidate any queries that start with `todos` in their query key:
2727

2828
```js
29-
import { useQuery, useQueryClient } from '@tanstack/svelte-query'
29+
import { useQuery, useQueryClient } from '@sveltestack/svelte-query'
3030

3131
// Get QueryClient from the context
3232
const queryClient = useQueryClient()

docs/src/pages/guides/query-retries.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ You can configure retries both on a global level and an individual query level.
1313
- Setting `retry = (failureCount, error) => ...` allows for custom logic based on why the request failed.
1414

1515
```js
16-
import { useQuery } from '@tanstack/svelte-query'
16+
import { useQuery } from '@sveltestack/svelte-query'
1717

1818
// Make a specific query retry a certain number of times
1919
const queryResult = useQuery(['todos', 1], fetchTodoListPage, {
@@ -30,7 +30,7 @@ The default `retryDelay` is set to double (starting at `1000`ms) with each attem
3030
```markdown
3131
<script>
3232
// Configure for all queries
33-
import { QueryCache, QueryClient, QueryClientProvider } from '@tanstack/svelte-query'
33+
import { QueryCache, QueryClient, QueryClientProvider } from '@sveltestack/svelte-query'
3434

3535
const queryClient = new QueryClient({
3636
defaultOptions: {

docs/src/pages/guides/window-focus-refetching.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ If a user leaves your application and returns to stale data, **Svelte Query auto
1010
```markdown
1111
<script>
1212
// Configure for all queries
13-
import { QueryClient, QueryClientProvider } from '@tanstack/svelte-query'
13+
import { QueryClient, QueryClientProvider } from '@sveltestack/svelte-query'
1414

1515
const queryClient = new QueryClient({
1616
defaultOptions: {
@@ -56,7 +56,7 @@ focusManager.setEventListener(handleFocus => {
5656
A great use-case for replacing the focus handler is that of iframe events. Iframes present problems with detecting window focus by both double-firing events and also firing false-positive events when focusing or using iframes within your app. If you experience this, you should use an event handler that ignores these events as much as possible. I recommend [this one](https://gist.github.com/tannerlinsley/1d3a2122332107fcd8c9cc379be10d88)! It can be set up in the following way:
5757

5858
```js
59-
import { focusManager } from '@tanstack/svelte-query'
59+
import { focusManager } from '@sveltestack/svelte-query'
6060
import onWindowFocus from './onWindowFocus' // The gist above
6161

6262
focusManager.setEventListener(onWindowFocus) // Boom!
@@ -65,7 +65,7 @@ focusManager.setEventListener(onWindowFocus) // Boom!
6565
## Managing focus state
6666

6767
```js
68-
import { focusManager } from '@tanstack/svelte-query'
68+
import { focusManager } from '@sveltestack/svelte-query'
6969

7070
// Override the default focus state
7171
focusManager.setFocused(true)

0 commit comments

Comments
 (0)