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

event<void> $store.reinit added #797

Merged
merged 2 commits into from
Oct 3, 2022
Merged

event<void> $store.reinit added #797

merged 2 commits into from
Oct 3, 2022

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