You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is necessary for feature migration to implicit context ("AsyncContext"). For explicit usage of "spy" or "get" semantics, we will export additional methods.
Deprecate the pipe operator in favor of the more capable mix operator.
We have received feedback that "pipe" is strongly associated with RxJS, which is not accurate, but marketing considerations take precedence here.
Replace reatomAsync with a regular action that includes an async function, and replace reatomResource with a standard atom that includes an async function.
This will enable applying all async operators for all actions and atoms! Also, we plan to allow asynchronous "spy" of dependencies!
Adopt a "suspense" strategy for error handling. This will open up a whole new vector of a simple and robust coding style.
Add autobatching with release change on a next tick.
Change withRetry api
The onReject cb should return not the amount of ms to retry, but the promise which successful resolve should mean the necessity of retry (and an error (abort error) should prevent retries).
Run the third argument of take immediately for an atoms to return the state without waiting, if it is already pass.
The upcoming version "4" will feature several changes, but most will be straightforward to migrate. Here is the list of main changes.
@reatom/framework
), except for adapters.@reatom/lens
.filter
operator as an alternative to existingselect
, which accepts an atom and the mapper function(next: State, prev?: State) => T
.ctx.get
,ctx.spy
, and allow calling an atom with one "ctx" argument for reading and tracking. #844ctx.schedule
in favor ofwrap(ctx, cbOrPromise)
. Deprecatectx.controller
in favor ofgetTopController(ctx)
. #845pipe
operator in favor of the more capablemix
operator.reatomAsync
with a regular action that includes an async function, and replacereatomResource
with a standard atom that includes an async function.withRetry
apitake
immediately for an atoms to return the state without waiting, if it is already pass.Minor fixes:
The text was updated successfully, but these errors were encountered: