Skip to content
Merged
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 .changes/createScope-destructure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"starfx": patch:deps
---

The `createScope` return signature change slightly in the upcoming version of `effection`. Adjusting preemptively for future compatibility.
8 changes: 1 addition & 7 deletions src/store/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,7 @@ export function createStore<S extends AnyState>({
scope: initScope,
middleware = [],
}: CreateStore<S>): FxStore<S> {
let scope: Scope;
if (initScope) {
scope = initScope;
} else {
const tuple = createScope();
scope = tuple[0];
}
const [scope] = initScope ? [initScope] : createScope();

let state = initialState;
const listeners = new Set<Listener>();
Expand Down
Loading