effector / effector/farfetched

Clarify `otherwise` behavior in docs

Open
#308 2 comments 0 reactions 0 assignees View on GitHub
discussion scope:core type:documentation
Dominant language
TypeScript
Stars
221
Forks
36
PR merge metrics
No merged PRs in 30d

Description

Hi!
I'm using query _retry_ with a following scenario:
- fetch some resource
- if it's 500 or network error – retry as described
- otherwise (40x errors for instance) – call some event
Option _otherwise_ is supported in _retry_, but if the query is not passing the _filter_ then otherwise won't be called and for me it's a counterintuitive behavior.
Also there is also a minor typing issue with otherwise event being void typed.
`Type 'Event' is not assignable to type 'Event>>'.`

[Codesandbox reproduce link](https://codesandbox.io/s/young-mountain-wqhp0g?file=/src/App.tsx)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.