Skip to content
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 docs/framework/angular/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ export class AppComponent {}

**store.ts**
```typescript
import { Store } from '@tanstack/store';
import { Store } from '@tanstack/angular-store';

// You can use @tanstack/store outside of App components too!
// You can instantiate the store outside of Angular components too!
export const store = new Store({
dogs: 0,
cats: 0,
Expand Down
6 changes: 2 additions & 4 deletions docs/framework/react/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ The basic react app example to get started with the TanStack react-store.
```tsx
import React from "react";
import ReactDOM from "react-dom/client";
import { useStore } from "@tanstack/react-store";
import { Store } from "@tanstack/store";
import { Store, useStore } from "@tanstack/react-store";

// You can use @tanstack/store outside of React components too!
// You can instantiate the store outside of React components too!
export const store = new Store({
dogs: 0,
cats: 0,
Expand Down Expand Up @@ -55,5 +54,4 @@ function App() {
const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(<App />);


```
3 changes: 2 additions & 1 deletion docs/framework/solid/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ id: quick-start
The basic Solid app example to get started with the TanStack Solid-store.

```jsx
import { useStore, Store } from '@tanstack/solid-store';
import { Store, useStore } from '@tanstack/solid-store';

// You can instantiate the store outside of Solid components too!
export const store = new Store({
  cats: 0,
  dogs: 0
Expand Down
2 changes: 1 addition & 1 deletion docs/framework/svelte/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The basic Svelte app example to get started with the TanStack svelte-store.
```ts
import { Store } from '@tanstack/svelte-store';

// You can use @tanstack/svelte-store outside of Svelte files too!
// You can instantiate the store outside of Svelte files too!
export const store = new Store({
dogs: 0,
cats: 0,
Expand Down
4 changes: 2 additions & 2 deletions docs/framework/vue/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import Display from './Display.vue';

**store.js**
```js
import { Store } from '@tanstack/store';
import { Store } from '@tanstack/vue-store';

// You can use @tanstack/store outside of Vue components too!
// You can instantiate the store outside of Vue components too!
export const store = new Store({
dogs: 0,
cats: 0,
Expand Down
3 changes: 3 additions & 0 deletions examples/angular/simple/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,8 @@
}
}
}
},
"cli": {
"analytics": false
}
}
1 change: 0 additions & 1 deletion examples/angular/simple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"@angular/platform-browser-dynamic": "^19.2.0",
"@angular/router": "^19.2.0",
"@tanstack/angular-store": "^0.7.0",
"@tanstack/store": "^0.7.0",
"rxjs": "^7.8.2",
"tslib": "^2.8.1",
"zone.js": "^0.15.0"
Expand Down
4 changes: 2 additions & 2 deletions examples/angular/simple/src/app/store.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Store } from '@tanstack/store'
import { Store } from '@tanstack/angular-store'

// You can use @tanstack/store outside of App components too!
// You can instantiate a Store outside of Angular components too!
export const store = new Store({
dogs: 0,
cats: 0,
Expand Down
2 changes: 1 addition & 1 deletion examples/react/simple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
},
"dependencies": {
"@tanstack/react-store": "^0.7.0",
"@tanstack/store": "^0.7.0",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.4",
"react-scan": "^0.2.12",
"vite": "^6.1.1"
},
"browserslist": {
Expand Down
8 changes: 5 additions & 3 deletions examples/react/simple/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { scan } from 'react-scan' // dev-tools for demo
import ReactDOM from 'react-dom/client'
import { useStore } from '@tanstack/react-store'
import { Store } from '@tanstack/store'
import { Store, useStore } from '@tanstack/react-store'

// You can use @tanstack/store outside of React components too!
// You can use instantiate a Store outside of React components too!
export const store = new Store({
dogs: 0,
cats: 0,
Expand Down Expand Up @@ -53,3 +53,5 @@ function App() {

const root = ReactDOM.createRoot(document.getElementById('root')!)
root.render(<App />)

scan()
1 change: 0 additions & 1 deletion examples/solid/simple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
},
"dependencies": {
"@tanstack/solid-store": "^0.7.0",
"@tanstack/store": "^0.7.0",
"solid-js": "^1.9.5"
},
"devDependencies": {
Expand Down
7 changes: 4 additions & 3 deletions examples/solid/simple/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useStore, Store } from '@tanstack/solid-store'
import { Store, useStore } from '@tanstack/solid-store'
import { render } from 'solid-js/web'

// You can instantiate a Store outside of Solid components too!
export const store = new Store({
cats: 0,
dogs: 0,
Expand All @@ -13,9 +14,9 @@ interface DisplayProps {
export const Display = (props: DisplayProps) => {
const count = useStore(store, (state) => state[props.animals])
return (
<span>
<div>
{props.animals}: {count()}
</span>
</div>
)
}

Expand Down
1 change: 0 additions & 1 deletion examples/svelte/simple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"vite": "^6.1.1"
},
"dependencies": {
"@tanstack/store": "^0.7.0",
"@tanstack/svelte-store": "^0.7.0"
}
}
2 changes: 1 addition & 1 deletion examples/svelte/simple/src/store.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Store } from '@tanstack/svelte-store'

// You can use @tanstack/svelte-store outside of Svelte files too!
// You can instantiate a Store outside of Svelte files too!
export const store = new Store({
dogs: 0,
cats: 0,
Expand Down
1 change: 0 additions & 1 deletion examples/vue/simple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"serve": "vite preview"
},
"dependencies": {
"@tanstack/store": "^0.7.0",
"@tanstack/vue-store": "^0.7.0",
"vue": "^3.5.13"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/vue/simple/src/store.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Store } from '@tanstack/store'
import { Store } from '@tanstack/vue-store'

// You can use @tanstack/store outside of Vue components too!
// You can instantiate a Store outside of Vue components too!
export const store = new Store({
dogs: 0,
cats: 0,
Expand Down
Loading