Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/mean-carpets-tell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@xstate/store': minor
---

Expose store transition utility and types
6 changes: 5 additions & 1 deletion packages/xstate-store/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ export { fromStore } from './fromStore';
export {
createStore,
createStoreWithProducer,
createStoreConfig
createStoreConfig,
createStoreTransition
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you add some basic tests for this one? one test that would show (roughly) how you plan to use it would be helpful

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My actual usage is just copy pasting the persist utility from David's branch. Maybe the better course of action here is to maybe get that branch merged instead with perhaps these extra utils exposed should someone else want to build a custom utility as well?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are copy-pasting from the other branch then let's not reuse that sample as a test case for this exposed util, a new one (even a rather dummy one) should be added to tests. At the moment, this util is indirectly tested because other things use it but when exposing it as part of the public API we should have an extra smoke test for this new public interface~

} from './store';
export { createAtom, createAsyncAtom } from './atom';
export type {
Expand Down Expand Up @@ -35,6 +36,9 @@ export type {
AtomOptions,
AnyAtom,
ReadonlyAtom,
StoreLogic,
AnyStoreLogic,
AnyStoreConfig,
EventFromStoreConfig,
EmitsFromStoreConfig,
ContextFromStoreConfig
Expand Down