Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v4 roadmap #841

Open
12 tasks
artalar opened this issue May 19, 2024 · 0 comments
Open
12 tasks

v4 roadmap #841

artalar opened this issue May 19, 2024 · 0 comments
Assignees

Comments

@artalar
Copy link
Owner

artalar commented May 19, 2024

The upcoming version "4" will feature several changes, but most will be straightforward to migrate. Here is the list of main changes.

  • Publish only an ESM bundle

    It's still being discussed.

  • Store all code in a single package (@reatom/framework), except for adapters.

    This will simplify code organization and versioning for both library authors and consumer developers.

  • Remove "FRP" operators from @reatom/lens.

    We aim to reduce the number of variants for solving the same task; most operators will be replaced with guidelines that follow best practices.

    • add filter operator as an alternative to existing select, which accepts an atom and the mapper function (next: State, prev?: State) => T.
  • Deprecate ctx.get, ctx.spy, and allow calling an atom with one "ctx" argument for reading and tracking. #844

    This is necessary for feature migration to implicit context ("AsyncContext"). For explicit usage of "spy" or "get" semantics, we will export additional methods.

  • Deprecate ctx.schedule in favor of wrap(ctx, cbOrPromise). Deprecate ctx.controller in favor of getTopController(ctx). #845
  • 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).

Minor fixes:

@artalar artalar self-assigned this May 19, 2024
@artalar artalar pinned this issue May 19, 2024
@artalar artalar mentioned this issue May 19, 2024
Closed
22 tasks
@artalar artalar changed the title v4 v4 roadmap May 19, 2024
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

No branches or pull requests

1 participant