Skip to content

Commit

Permalink
[docs] Adding devtool notes
Browse files Browse the repository at this point in the history
  • Loading branch information
lostpebble committed Aug 5, 2021
1 parent 9fd058e commit b353d97
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 5 deletions.
25 changes: 25 additions & 0 deletions docs/redux-dev-tools.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
id: redux-dev-tools
title: Redux Devtools
sidebar_label: Redux Devtools
---

Pullstate includes a simple way to plug into Redux's devtools, which are well established and developed.

Simply include the following somewhere after your Store definitions:

```ts
import { registerInDevtools, Store } from "pullstate";

// Store definition
const ExampleStore = new Store({
//...
});

// Register as many or as few Stores as you would like to monitor
registerInDevtools({
ExampleStore,
});
```

After this, you should be able to open the Redux devtools tab and see each Store registered and showing changes.
27 changes: 22 additions & 5 deletions website/sidebars.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,37 @@
{
"docs": {
"Getting Started": ["installation", "quick-example", "quick-example-server-rendered"],
"Reading Store State": ["use-store-state-hook", "inject-store-state", "subscribe"],
"Updating Store State": ["update-store", "reactions"],
"Getting Started": [
"installation",
"quick-example",
"quick-example-server-rendered"
],
"Reading Store State": [
"use-store-state-hook",
"inject-store-state",
"subscribe"
],
"Updating Store State": [
"update-store",
"reactions"
],
"Async Actions": [
"async-actions-introduction",
"async-actions-creating",
"async-action-use",
{
"type": "subcategory",
"label": "Async Action Hooks",
"ids": ["async-hooks-overview", "async-post-action-hook", "async-short-circuit-hook", "async-cache-break-hook"]
"ids": [
"async-hooks-overview",
"async-post-action-hook",
"async-short-circuit-hook",
"async-cache-break-hook"
]
},
"async-actions-other-options",
"async-cache-clearing",
"async-server-rendering"
]
],
"Dev Tools": ["redux-dev-tools"]
}
}

0 comments on commit b353d97

Please sign in to comment.