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

[v5] Remove FSM-related code #4265

Merged
merged 7 commits into from
Sep 12, 2023
Merged

[v5] Remove FSM-related code #4265

merged 7 commits into from
Sep 12, 2023

Conversation

davidkpiano
Copy link
Member

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Sep 11, 2023

🦋 Changeset detected

Latest commit: 1e2cd71

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@xstate/react Major
@xstate/vue Major

Not sure what this means? Click here to learn what changesets are.

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

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 11, 2023

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 1e2cd71:

Sandbox Source
XState Example Template Configuration
XState React Template Configuration

@andy-zhou
Copy link

andy-zhou commented Sep 12, 2023

Happened to see this PR. Is @xstate/fsm getting sunset?

@davidkpiano
Copy link
Member Author

Happened to see this PR. Is @xstate/fsm getting sunset?

Yes; the plan is that xstate itself should be used most of the time, and if bundle size is a concern, perhaps a fromFSM(...) actor logic creator can be provided inside xstate itself, which would be tree-shakeable.

What is your use-case for @xstate/fsm? Is it just the bundle size?

@andy-zhou
Copy link

No usecase here - I was just taking a look at the differences between the two. Deprecate away.

@abmagil
Copy link

abmagil commented Sep 14, 2023

@davidkpiano - since you were asking about use cases. I encountered the situation where I was trying to introduce state machines to an app with an already present state management system (redux). I got pushback because of the bundle size, as you suggest. Having an easy-to-bundle-shake solution would let me keep using xstate's API in the small footprint that I actually need it for.

@hysan
Copy link

hysan commented Jan 8, 2024

@davidkpiano hi, I found this issue while looking for docs on @xstate/fsm. My use case is the same as @abmagil. Is there a small bundle size solution in v5, or should I be using @xstate/fsm? <- if I go that route, is there anything I should be worried about when using it with xstate/react?

@Andarist
Copy link
Member

Andarist commented Jan 8, 2024

V5 reduced the bundlesize of XState quite a bit - but, of course, it's still not exactly close to the size of @xstate/fsm. If this is very important to you then you can still use @xstate/fsm but then please continue using @xstate/react@^3 and import hooks from @xstate/react/fsm

@github-actions github-actions bot mentioned this pull request Feb 21, 2024
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.

None yet

5 participants