Replies: 3 comments 13 replies
-
Beta Was this translation helpful? Give feedback.
-
|
I don't think sending an action payload is supported. It feels generally impossible as Zustand actions are conventions unlike Redux actions. But, under some constraints, it should be possible. If anyone is interested, feel free to dig into it further. |
Beta Was this translation helpful? Give feedback.
-
|
What's a bit confusing is that the examples shown by @josemahs and @mahendradambe look different: {
"type": "addSelectedCandidate",
"payload": {
"candidate": {
"id": 1,
"name": "test"
},
"scope": "candidates"
}
}{
type: "ACTION",
payload: {
args: ["123"],
name: "addTab",
rest: "[]",
selected: 0
},
state: undefined,
id: "1",
source: "@devtools-extension"
}It looks like the latter is correct? |
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am using the redux devtools extension for my browser and to make my flows more efficient, and i need to figure out how can the dispatch textarea works with zustand.
There is a simplification of my store:
After some debugging i want to execute an action manually with the devtools dispatcher. What i am doing is putting the action object in the textarea and click the dispatch button and zustand devtools middleware throws the next error...
[zustand devtools middleware] Could not parse the received json SyntaxError: Expected property name or '}' in JSON at position 4 (line 2 column 3)The JSON i am trying to dispatch:
{ "type": "addSelectedCandidate", "payload": { "candidate": { "id": 1, "name": "test" }, "scope": "candidates" } }StackBlitz example
Anyone could provide me some information about this?
Beta Was this translation helpful? Give feedback.
All reactions