Skip to content

Commit f002f26

Browse files
committed
rebuild docs and bump package
1 parent bb6490f commit f002f26

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ interface User {
4949
email: string;
5050
}
5151

52-
const userStore = createStore({
52+
const userStore = createStore<User>({
5353
name: 'UserStore',
5454
state: { user: null as User | null, loading: false }
5555
});
@@ -830,7 +830,7 @@ console.log(userStore.getProp('profile.preferences')); // { theme: 'light', noti
830830
### React/Preact
831831
```jsx
832832
import { createStore, type TState } from "substate";
833-
import { useSubstate, useSubstateActions } from "substate/react"
833+
import { useSubstate, useSubstateActions } from "substate/react"; // or "substate/preact"
834834

835835
type MyAppState = TState & {
836836
firstName: string;
@@ -1156,7 +1156,7 @@ function createStore(config: ICreateStoreConfig): ISubstate
11561156

11571157
| Property | Type | Required | Default | Description |
11581158
|----------|------|----------|---------|-------------|
1159-
| `name` | `string` | | - | Unique identifier for the store |
1159+
| `name` | `string` | | - | Unique identifier for the store |
11601160
| `state` | `object` || `{}` | Initial state object |
11611161
| `defaultDeep` | `boolean` || `false` | Enable deep cloning by default for all updates |
11621162
| `beforeUpdate` | `UpdateMiddleware[]` || `[]` | Functions called before each state update |

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "substate",
3-
"version": "10.0.0-beta.5",
3+
"version": "10.0.0",
44
"description": "Pub/Sub pattern with State Management",
55
"type": "module",
66
"main": "dist/index.umd.js",
@@ -63,7 +63,6 @@
6363
"reset": "node scripts/clear-all-dependencies.js && npm install && npm run integration:setup",
6464
"refresh": "npm ci && npm run integration:setup",
6565
"fix": "biome check --write src/ && biome format --write src/ && biome lint --write src/",
66-
"pre": "npm run check && npm run test && npm run build && npm run docs && npm publish --tag next",
6766
"prepublish": "npm run check && npm run test && npm run build && npm run docs",
6867
"prod:publish": "npm run prepublish && npm publish",
6968
"alpha:publish": "npm run prepublish && npm publish --tag alpha",

0 commit comments

Comments
 (0)