Releases: effector/patronum
Releases · effector/patronum
v1.8.3
🐛 Bug Fixes
- fix
condition
method callingelse
branch whenthen
branch changespredicate
#204 (@sergeysova)
📚 Documentation
- fixes example for
delay
#200 (@zarabotaet)
🚀 Experimental
- Added experimental operators
and
,or
,not
,either
,equals
They're allow us to write logical conditions easily without much combines and maps:
// without logical operators
const $userExists = $user.map(user => user !== null);
const $isAttemptsMaximum = $numberOfAttempts.map(attempts => attempts >= ATTEMPTS_MAXIMUM);
sample({
clock,
source,
filter: combine(
$isAttemptsMaximum,
$cardActivated,
$restricted,
$userExists,
(isAttemptsMaximumx, activated, restricted, userExists) => !isAttemptsMaximum && activated && !restricted && userExists,
),
target,
})
// with these logical operators
const $isAttemptsMaximum = $numberOfAttempts.map(attempts => attempts >= ATTEMPTS_MAXIMUM)
sample({
clock,
source,
filter: and(
not($isAttemptsMaximum),
$cardActivated,
not(equals($user, null)),
not($restricted),
),
target,
})
It is experimental! Use on your own risk. Each method create a new store and calls
combine
under the hood.
v1.8.2
v1.8.1
v1.8.0
v1.7.0 🦋 petilia
🚀 Features
- Add initial support for babel-macro. It is useful for CRA support
import { splitMap } from 'patronum/macro';
- Add
snapshot
method #150 (@igorkamyshev) - Add
interval
method #163 (@sergeysova) - Add
time
method #172 (@sergeysova) - Add
format
method #176 (@sergeysova, @blednaya-luna) - Add
reset
method #181 (@sergeysova) - Add short form for
every
#193 (@sergeysova) - Allow to pass Store as predicate to
every
#192 (@sergeysova)
🐛 Bug Fixes
- Fix unresolved promise in
interval
withallSettled
#190 (@AlexandrHoroshih) - Fix batch store updates on
spread
method #186 (@Kelin2025)
📚 Documentation
v1.7.0-next.0
🚀 Features
- Add
reset
method implementation #181 (@sergeysova)
🐛 Bug Fixes
- fix batch store updates on
spread
(#183) #186 (@Kelin2025)
🧰 Maintenance
v1.6.0-next.0
- Add new
format
method #176 (@sergeysova)
v1.5.0-next.0
🚀 Features
- Add a
time
method #172 (@sergeysova)
v1.4.0-next.1
- Fix interval method in babel plugin list
v1.4.0-next.0
🚀 Features
- implement basic interval method #163 (@sergeysova)