-
-
Notifications
You must be signed in to change notification settings - Fork 811
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Experiment] Add xstate-devtools #439
base: master
Are you sure you want to change the base?
Conversation
It's now on the official repo, it may have changed a lot. I still using the old version for a while. I'm welcome to any help to upgrade that! |
@jhen0409 Hey, sorry for the late reply. It would be great if @davidkpiano and @amitnovick could give us some pointers. I do see this tool as a "must have" when working with xstate and react native, so it would be awesome if we could get this implemented soon. |
I am reworking the dev tools (first working on an embeddable visualizer) so it might be a few more weeks until dev tools are released. However, there is the (undocumented) import { MachineViz } from '@xstate/viz';
// ...
<MachineViz machine={someMachine} state={someState} /> Here is an example of that working: https://codesandbox.io/s/xstate-minute-timer-with-viz-g1cje Let me know if that helps for now. |
It seems a lot has changed since this work was initiated. We have a new Inspector tool for web via the @xstate/inspect package, which is so much more powerful than the original visualizer. I would love to attempt to get this new inspector working with React Native, and integrated into RNDebugger, but I can't seem to find the inspector front end code... @davidkpiano is there a way you could open up the Inspector front end code? Thanks again for this amazing tool! |
Yep, I'm currently working on this! |
This PR is integration for
xstate-devtools
browser extension (statecharts/xstate-viz#30). Implemented in a simple way like #298.The XState core is used
__REDUX_DEVTOOLS_EXTENSION__.connect
, so it have simple logging feature withredux-devtools
. Thexstate-devtools
wrapped the method and providedmachine
argument.For RNDebugger, I added
useXStateViz
devTools option, allows users to choose simple logging onredux-devtools
or the visualizer ofxstate-devtools
.I think the final goal will be integrate
xstate-viz
intoredux-devtools-core
, it can be made more features thatredux-devtools-extension
has.