Skip to content
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

Minor Fix to todomvc-react Example Project #4580

Merged

Conversation

garethmj
Copy link
Contributor

Hello,

I hope I'm not stepping out of line here but I had pulled down the xstate repo to help myself learn about the library in more detail and attempted to run examples/todomvc-react but found a few minor issues related to the v5 upgrade:

• Initially, running pnpm run dev resulted in the error:

[vite] Dep optimization failed with error:
'ActorStatus' is not exported by node_modules/.pnpm/xstate@5.2.1/node_modules/xstate/dist/xstate.esm.js, imported by node_modules/.pnpm/@xstate+react@4.0.0-beta.10_@types+react@17.0.59_react@17.0.2_xstate@5.2.1/node_modules/@xstate/react/dist/xstate-react.esm.js

Pinning xstate-react at ^4.0.0 rather than beta resolved this issue.

• On using the example app re-opening the page caused a failure due to the change in state persistence method from getPersistedState() to getPersistedSnapshot (). Moving to the new method name appears to resolve the issue.

I hope this PR is useful. Obviously, please let me know if there are any stylistic changes needed in order to make it a candidate to merge. I have not created a change set as that didn't seem appropriate for an example?

Copy link

changeset-bot bot commented Dec 10, 2023

⚠️ No Changeset found

Latest commit: 6501518

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 6501518:

Sandbox Source
XState Example Template Configuration
XState React Template Configuration

@davidkpiano
Copy link
Member

Very useful, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants