-
-
Notifications
You must be signed in to change notification settings - Fork 47
docs(react): basic setup #13
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
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| --- | ||
| title: Basic setup | ||
| id: basic-setup | ||
| --- | ||
|
|
||
| TanStack devtools provides you with an easy to use and modular client that allows you to compose multiple devtools into one easy to use panel. | ||
|
|
||
| ## Setup | ||
|
|
||
| Install the [TanStack Devtools](https://www.npmjs.com/package/@tanstack/react-devtools) library, this will install the devtools core as well as provide you framework specific adapters. | ||
|
|
||
| ```bash | ||
| npm i @tanstack/react-devtools | ||
| ``` | ||
|
|
||
| Next in the root of your application import the `TanstackDevtools` from the required framework adapter (in this case @tanstack/react-devtools). | ||
|
|
||
| ```tsx | ||
| import { TanstackDevtools } from '@tanstack/react-devtools' | ||
|
|
||
| import App from './App' | ||
|
|
||
| createRoot(document.getElementById('root')!).render( | ||
| <StrictMode> | ||
| <App /> | ||
|
|
||
| <TanstackDevtools /> | ||
| </StrictMode>, | ||
| ) | ||
| ``` | ||
|
|
||
| Import the desired devtools and provide it to the `TanstackDevtools` component along with a label for the menu. | ||
|
|
||
| Currently TanStack offers: | ||
|
|
||
| - `QueryDevtools` | ||
| - `RouterDevtools` | ||
| - `FormDevtools` | ||
|
|
||
| ```tsx | ||
| import { createRoot } from 'react-dom/client' | ||
|
|
||
| import { TanstackDevtools } from '@tanstack/react-devtools' | ||
|
|
||
| import { ReactQueryDevtoolsPanel } from '@tanstack/react-query-devtools' | ||
| import { TanStackRouterDevtoolsPanel } from '@tanstack/react-router-devtools' | ||
| import { ReactFormDevtoolsPanel } from '@tanstack/react-form' | ||
|
|
||
|
|
||
| import App from './App' | ||
|
|
||
| createRoot(document.getElementById('root')!).render( | ||
| <StrictMode> | ||
| <App /> | ||
|
|
||
| <TanstackDevtools | ||
| plugins={[ | ||
| { | ||
| name: 'Tanstack Query', | ||
| render: <ReactQueryDevtoolsPanel />, | ||
| }, | ||
| { | ||
| name: 'Tanstack Router', | ||
| render: <TanStackRouterDevtoolsPanel />, | ||
| }, | ||
| { | ||
| name: 'Tanstack Form', | ||
| render: <ReactFormDevtoolsPanel />, | ||
| }, | ||
| ]} | ||
| /> | ||
| </StrictMode>, | ||
| ) | ||
| ``` | ||
|
|
||
| Finally add any additional configuration you desire to the `TanstackDevtools` component, more information can be found under the [TanStack Devtools Configuration](https://tanstack.com/devtools/) section. | ||
|
|
||
| A complete working example can be found in our [examples section](https://tanstack.com/devtools/latest/docs/framework/react/examples). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| --- | ||
| title: Basic setup | ||
| id: basic-setup | ||
| --- | ||
|
|
||
| TanStack devtools provides you with an easy to use and modular client that allows you to compose multiple devtools into one easy to use panel. | ||
|
|
||
| ## Setup | ||
|
|
||
| Install the [TanStack Devtools](https://www.npmjs.com/package/@tanstack/solid-devtools) library, this will install the devtools core as well as provide you framework specific adapters. | ||
|
|
||
| ```bash | ||
| npm i @tanstack/solid-devtools | ||
| ``` | ||
|
|
||
| Next in the root of your application import the `TanstackDevtools` from the required framework adapter (in this case @tanstack/solid-devtools). | ||
|
|
||
| ```tsx | ||
| import { TanstackDevtools } from '@tanstack/solid-devtools' | ||
|
|
||
| import App from './App' | ||
|
|
||
| createRoot(document.getElementById('root')!).render( | ||
| <StrictMode> | ||
| <App /> | ||
|
|
||
| <TanstackDevtools /> | ||
| </StrictMode>, | ||
| ) | ||
| ``` | ||
|
|
||
| Import the desired devtools and provide it to the `TanstackDevtools` component along with a label for the menu. | ||
|
|
||
| Currently TanStack offers: | ||
|
|
||
| - `QueryDevtools` | ||
| - `RouterDevtools` | ||
| - `FormDevtools` | ||
|
|
||
| ```tsx | ||
| import { render } from 'solid-js/web'; | ||
|
|
||
| import { TanstackDevtools } from '@tanstack/solid-devtools' | ||
|
|
||
| import { SolidQueryDevtoolsPanel } from '@tanstack/solid-query-devtools' | ||
| import { TanStackRouterDevtoolsPanel } from '@tanstack/solid-router-devtools' | ||
| import { SolidFormDevtoolsPanel } from '@tanstack/solid-form' | ||
|
|
||
| import App from './App' | ||
|
|
||
| render(() => ( | ||
| <> | ||
| <App /> | ||
|
|
||
| <TanstackDevtools | ||
| plugins={[ | ||
| { | ||
| name: 'Tanstack router', | ||
| render: () => <TanStackRouterDevtoolsPanel />, | ||
| }, | ||
| { | ||
| name: 'Tanstack Form', | ||
| render: () => <SolidFormDevtoolsPanel />, | ||
| }, | ||
| ]} | ||
| /> | ||
| </> | ||
| ), document.getElementById('root')!); | ||
| ``` | ||
|
|
||
| Finally add any additional configuration you desire to the `TanstackDevtools` component, more information can be found under the [TanStack Devtools Configuration](https://tanstack.com/devtools/) section. | ||
|
|
||
| A complete working example can be found in our [examples section](https://tanstack.com/devtools/latest/docs/framework/solid/examples). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,16 @@ | ||
| --- | ||
| title: TanStack Devtools Solid Adapter | ||
| ref: docs/framework/react/adapter.md | ||
| replace: { | ||
| "React": "Solid", | ||
| "react": "solid" | ||
| } | ||
| ref: adapter | ||
| --- | ||
|
|
||
| If you are using TanStack Devtools in a Solid application, we recommend using the Solid Adapter. The Solid Adapter provides a set of easy-to-use hooks on top of the core Devtools utilities. If you find yourself wanting to use the core Devtools classes/functions directly, the Solid Adapter will also re-export everything from the core package. | ||
|
|
||
| ## Installation | ||
|
|
||
| ```sh | ||
| npm install @tanstack/solid-devtools | ||
| ``` | ||
|
|
||
| ## Solid Hooks | ||
|
|
||
| TODO |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.