Skip to content

event<void> $store.reinit added#797

Merged
zerobias merged 2 commits intoeffector:masterfrom
xaota:master
Oct 3, 2022
Merged

event<void> $store.reinit added#797
zerobias merged 2 commits intoeffector:masterfrom
xaota:master

Conversation

@xaota
Copy link
Contributor

@xaota xaota commented Oct 2, 2022

$store.reinit - event to set default value into store

const $store = createStore<Array<number>>([]);

sample({
  clock: someEffectFailed,
  target: $store.reinit
});

// subscribe on store reinit
sample({
  clock: $store.reinit,
  fn: () => console.log("store value set to default")
});

Conventions

event to set default value into store
@netlify
Copy link

netlify bot commented Oct 2, 2022

👷 Deploy request for effector-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit a716ede

@zerobias zerobias self-requested a review October 3, 2022 08:24
Copy link
Member

@zerobias zerobias left a comment

Choose a reason for hiding this comment

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

Great, thanks!

@zerobias zerobias merged commit cd637fa into effector:master Oct 3, 2022
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