Skip to content

Conversation

@sergeysova
Copy link
Member

@sergeysova sergeysova commented Aug 13, 2020

const fx = createEffect().use(() => null)

const d = fx.filter({
  fn(a) {
    return a > 0
  },
})

d.watch(console.log)

fx(5)
fx(0)
fx(1)

https://share.effector.dev/G34PZ7qF

@sergeysova sergeysova requested a review from zerobias August 13, 2020 16:08
inFlight: Store<number>
watch(watcher: (payload: Params) => any): Subscription
filter(config: {fn(payload: Params): boolean}): Event<Params>
filterMap<T>(fn: (payload: Params) => T | undefined): Event<T>
Copy link
Member

Choose a reason for hiding this comment

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

image

Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason why you have skipped the first overload?

Copy link
Member Author

Choose a reason for hiding this comment

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

It is forgotten.

@zerobias
Copy link
Member

👍

@zerobias zerobias merged commit 7b35a71 into master Aug 13, 2020
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.

4 participants