Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into chore/api-extractor
Browse files Browse the repository at this point in the history
  • Loading branch information
arnoud-dv committed May 4, 2024
2 parents 23a6d27 + d032247 commit c80a1f4
Show file tree
Hide file tree
Showing 88 changed files with 1,114 additions and 445 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ Still on **React Query v4**? No problem! Check out the v4 docs here: https://tan

### [Become a Sponsor!](https://github.com/sponsors/tannerlinsley/)

<!-- Use the force, Luke! -->
<!-- Use the force, Luke -->
12 changes: 12 additions & 0 deletions docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,21 @@
"label": "Overview",
"to": "framework/solid/overview"
},
{
"label": "Quick Start",
"to": "framework/solid/quick-start"
},
{
"label": "Installation",
"to": "framework/solid/installation"
},
{
"label": "Devtools",
"to": "framework/solid/devtools"
},
{
"label": "TypeScript",
"to": "framework/solid/typescript"
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion docs/framework/angular/guides/disabling-queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class TodosComponent {

todosQuery = injectQuery(() => ({
queryKey: ['todos', this.filter()],
queryFn: this.filter ? () => fetchTodos(this.filter()) : skipToken,
queryFn: this.filter() ? () => fetchTodos(this.filter()) : skipToken,
}))
}
```
Expand Down
2 changes: 1 addition & 1 deletion docs/framework/react/plugins/createSyncStoragePersister.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ The default options are:
#### `serialize` and `deserialize` options

There is a limit to the amount of data which can be stored in `localStorage`.
If you need to store more data in `localStorage`, you can override the `serialize` and `deserialize` functions to compress and decrompress the data using a library like [lz-string](https://github.com/pieroxy/lz-string/).
If you need to store more data in `localStorage`, you can override the `serialize` and `deserialize` functions to compress and decompress the data using a library like [lz-string](https://github.com/pieroxy/lz-string/).

```tsx
import { QueryClient } from '@tanstack/react-query'
Expand Down
4 changes: 1 addition & 3 deletions docs/framework/solid/devtools.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ Wave your hands in the air and shout hooray because Solid Query comes with dedic

When you begin your Solid Query journey, you'll want these devtools by your side. They help visualize all of the inner workings of Solid Query and will likely save you hours of debugging if you find yourself in a pinch!

> Also note that you can use these devtools to observe queries, but **not mutations** (yet).
## Install and Import the Devtools

The devtools are a separate package that you need to install:
Expand All @@ -29,7 +27,7 @@ You can import the devtools like this:
import { SolidQueryDevtools } from '@tanstack/solid-query-devtools'
```

By default, Solid Query Devtools are only included in bundles when `process.env.NODE_ENV === 'development'`, so you don't need to worry about excluding them during a production build.
By default, Solid Query Devtools are only included in bundles when `isServer === true` ([`isServer`](https://github.com/solidjs/solid/blob/a72d393a07b22f9b7496e5eb93712188ccce0d28/packages/solid/web/src/index.ts#L37) comes from the `solid-js/web` package), so you don't need to worry about excluding them during a production build.

## Floating Mode

Expand Down
47 changes: 47 additions & 0 deletions docs/framework/solid/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
id: installation
title: Installation
---

You can install Solid Query via [NPM](https://npmjs.com/),
or a good ol' `<script>` via
[ESM.sh](https://esm.sh/).

### NPM

```bash
$ npm i @tanstack/solid-query
# or
$ pnpm add @tanstack/solid-query
# or
$ yarn add @tanstack/solid-query
# or
$ bun add @tanstack/solid-query
```

> Wanna give it a spin before you download? Try out the [simple](../examples/simple) or [basic](../examples/basic) examples!
### CDN

If you're not using a module bundler or package manager, you can also use this library via an ESM-compatible CDN such as [ESM.sh](https://esm.sh/). Simply add a `<script type="module">` tag to the bottom of your HTML file:

```html
<script type="module">
import { QueryClient } from 'https://esm.sh/@tanstack/solid-query'
</script>
```

### Requirements

Solid Query is optimized for modern browsers. It is compatible with the following browsers config

```
Chrome >= 91
Firefox >= 90
Edge >= 91
Safari >= 15
iOS >= 15
Opera >= 77
```

> Depending on your environment, you might need to add polyfills. If you want to support older browsers, you need to transpile the library from `node_modules` yourselves.
Loading

0 comments on commit c80a1f4

Please sign in to comment.