@buoy-gg/redux 7.0.36 → 7.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -9
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@buoy-gg/redux) [](https://www.npmjs.com/package/@buoy-gg/redux)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Inspect your connected Redux store, review captured actions and state changes, and dispatch actions from your device.
|
|
6
6
|
|
|
7
|
-
Part of [Buoy](https://github.com/Buoy-gg/buoy)
|
|
7
|
+
Part of [Buoy](https://github.com/Buoy-gg/buoy). Install the package, complete account setup, and follow the integration steps below.
|
|
8
8
|
|
|
9
9
|
## Install
|
|
10
10
|
|
|
@@ -12,11 +12,30 @@ Part of [Buoy](https://github.com/Buoy-gg/buoy) — devtools that live inside yo
|
|
|
12
12
|
npm install @buoy-gg/core @buoy-gg/redux
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
+
## Before you start
|
|
16
|
+
|
|
17
|
+
Use a development build with `@buoy-gg/core` and a Free or Pro Buoy account key. From your app’s directory, sign in:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npx --package=@buoy-gg/core buoy login
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
For Expo, initialize Buoy before rendering the menu:
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
import { Buoy } from "@buoy-gg/core";
|
|
27
|
+
|
|
28
|
+
Buoy.init({ licenseKey: process.env.EXPO_PUBLIC_BUOY_KEY });
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
The login command writes the Expo key to `.env.local`. For React Native CLI, pass the key from your app’s environment configuration; React Native does not load `.env.local` automatically. Mount `FloatingDevTools` inside the same providers as your screens and restart the development server after installation. The [Quick Start](https://buoy.gg/buoy/latest/docs/quick-start) shows the complete root component setup.
|
|
32
|
+
|
|
15
33
|
## Quick start
|
|
16
34
|
|
|
17
|
-
|
|
35
|
+
Load the Buoy Redux integration before creating your store and keep Redux DevTools integration enabled. The example uses your existing `rootReducer` and app component; do not create a second store for Buoy.
|
|
18
36
|
|
|
19
37
|
```tsx
|
|
38
|
+
import '@buoy-gg/redux'; // Load before the module that creates your store.
|
|
20
39
|
import { configureStore } from '@reduxjs/toolkit';
|
|
21
40
|
import { Provider } from 'react-redux';
|
|
22
41
|
import { FloatingDevTools } from '@buoy-gg/core';
|
|
@@ -33,11 +52,11 @@ export default function App() {
|
|
|
33
52
|
}
|
|
34
53
|
```
|
|
35
54
|
|
|
36
|
-
###
|
|
55
|
+
### Capture modes
|
|
37
56
|
|
|
38
57
|
Buoy binds to your store the earliest way available, in this order:
|
|
39
58
|
|
|
40
|
-
1. **Store-creation hook (default, full capture)** — importing `@buoy-gg/redux` claims the Redux DevTools global that RTK checks by default. If the package loads before your store module, Buoy is inside the store from creation: every action (thunk-internal, RTK Query) is captured and time travel is real. To
|
|
59
|
+
1. **Store-creation hook (default, full capture)** — importing `@buoy-gg/redux` claims the Redux DevTools global that RTK checks by default. If the package loads before your store module, Buoy is inside the store from creation: every action (thunk-internal, RTK Query) is captured and time travel is real. To establish this ordering, make it the first import of your app entry:
|
|
41
60
|
|
|
42
61
|
```tsx
|
|
43
62
|
// index.js — first line
|
|
@@ -47,7 +66,12 @@ Buoy binds to your store the earliest way available, in this order:
|
|
|
47
66
|
2. **Middleware (explicit full capture)** — one line if you prefer being explicit:
|
|
48
67
|
|
|
49
68
|
```tsx
|
|
50
|
-
|
|
69
|
+
import { buoyReduxMiddleware } from "@buoy-gg/redux";
|
|
70
|
+
|
|
71
|
+
const store = configureStore({
|
|
72
|
+
reducer: rootReducer,
|
|
73
|
+
middleware: (getDefault) => getDefault().concat(buoyReduxMiddleware),
|
|
74
|
+
});
|
|
51
75
|
```
|
|
52
76
|
|
|
53
77
|
3. **Startup fallback** — if your store was created before Buoy loaded, `FloatingDevTools` binds it automatically at app mount. Top-level dispatches are captured from startup; actions dispatched *inside* thunks/middleware aren't visible to this mode (the tool tells you when it's in it).
|
|
@@ -64,6 +88,10 @@ const store = configureStore({
|
|
|
64
88
|
});
|
|
65
89
|
```
|
|
66
90
|
|
|
91
|
+
## Check the integration
|
|
92
|
+
|
|
93
|
+
Dispatch an existing app action and confirm that its action and state change appear. Keep the Redux devtools connection enabled and initialize Buoy’s Redux integration before creating the store. Jumping to a retained state does not reverse backend requests or other side effects.
|
|
94
|
+
|
|
67
95
|
## What you get
|
|
68
96
|
|
|
69
97
|
- **Every action, captured** — type, payload, timestamp, and a diff summary (`+added -removed ~modified`) per dispatch
|
|
@@ -77,11 +105,11 @@ const store = configureStore({
|
|
|
77
105
|
|
|
78
106
|
## Desktop & AI
|
|
79
107
|
|
|
80
|
-
|
|
108
|
+
To connect a React Native app to [Buoy Desktop](https://github.com/Buoy-gg/Buoy-Desktop) or MCP, install `@buoy-gg/external-sync` and follow the [Desktop connection guide](https://buoy.gg/buoy/latest/docs/desktop). Sign in to Desktop separately. [MCP setup](https://buoy.gg/buoy/latest/docs/mcp) also requires a process account and Pro access. Available remote actions depend on the tool and app integration.
|
|
81
109
|
|
|
82
|
-
##
|
|
110
|
+
## Account and plan requirements
|
|
83
111
|
|
|
84
|
-
|
|
112
|
+
Use a Free or Pro Buoy account. History limits and paid features vary by tool; see [pricing](https://buoy.gg/pricing). Production access requires Pro where supported. Development-only hooks and actions remain unavailable in release builds.
|
|
85
113
|
|
|
86
114
|
---
|
|
87
115
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buoy-gg/redux",
|
|
3
|
-
"version": "7.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "7.0.39",
|
|
4
|
+
"description": "Inspect a connected Redux store, captured actions and state changes, and dispatch supported actions from Buoy tools.",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
7
7
|
"types": "lib/typescript/index.d.ts",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"**/snapshotProvider.ts"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@buoy-gg/shared-ui": "^7.0.
|
|
35
|
-
"@buoy-gg/floating-tools-core": "^7.0.
|
|
36
|
-
"@buoy-gg/license": "^7.0.
|
|
34
|
+
"@buoy-gg/shared-ui": "^7.0.39",
|
|
35
|
+
"@buoy-gg/floating-tools-core": "^7.0.39",
|
|
36
|
+
"@buoy-gg/license": "^7.0.39"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@reduxjs/toolkit": ">=1.9.0",
|