Skip to content

event<void> $store.reinit added - #797

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

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

Conversation

@xaota

@xaota xaota commented Oct 2, 2022

Copy link
Copy Markdown
Contributor

$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

netlify Bot commented Oct 2, 2022

Copy link
Copy Markdown

👷 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

@zerobias zerobias left a comment

Copy link
Copy Markdown
Member

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