-
-
Notifications
You must be signed in to change notification settings - Fork 649
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
Roadmap to v1 #333
Comments
I think basic devtools should be a part of v1. Then we will know that the snapshot parts are stable. |
@Aslemammad, I think I'm gonna do some about blog posts. But I have to finish some stuff going on here. |
If some will wrap |
@RIP21 Nice idea. Would you create a dedicated issue please? I'm interested, but if someone is too, they can try. |
We did it! 🎉 🎉 🎉 |
We are getting ready. Here's action items.
Fixing bugs
For this we need more bug reports.
setAtom
doesn't bail on same value if component reads from another atom #355setAtom
doesn't bail on same value if component reads from another atomuseAtomCallback
doesn't have types for 3-param signature #398useAtomCallback
doesn't have types for 3-param signatureatom()
typing fix: improve types without NonFunction in atom() #438enabled
option doesn't work on remount @dai-shi @AslemammadImproving docs
This is most important for v1.
atomFamily
typings to be obvious to use #436 [Docs] Improve atomFamily typings to be obvious to useImproving types and tests
Improving apis
atomFamily
(BREAKING CHANGE) #385 Generalize atomFamily (BREAKING CHANGE)freezeAtomCreator
, dropatomFrozenInDev
(BREAKING CHANGE) feat(utils): addfreezeAtomCreator
, dropatomFrozenInDev
(BREAKING CHANGE) #441 @dai-shiBenchmarking
react-redux-benchmarks
@Aslemammad https://github.com/Aslemammad/react-state-benchmarksDevtools
We have
useDebugState
in Provider andjotai/devtools
for Redux DevTools Ext.It would be nice to have a dedicated devtools.
Adding features
This is actually not required for v1, but nice to have.
Tutorials
Maybe we should do this outside repo.
Anyone would like to write blog posts or something?
Release Note
Draft
Announcing Jotai v1
We are pleased to announce jotai v1 release!
Jotai is a primitive and flexible state management library for React.
Demos:
Global state like useState
Jotai's atoms can be used like useState, but it's global state.
Derived state
You can create a derived atom with
read
function.Minimal API and additional utilities
Jotai core
jotai
exposes only two functionsatom
,useAtom
and one optional componentProvider
.We have more functions in separate bundles
jotai/*
, such asjotai/utils
andjotai/devtools
.For example, those include
atomWithStorage
,atomWithReset
,atomFamily
, to name a few.They are all implemented with the public api of jotai core.
So, you can also create a similar third-party library.
Async support
Jotai comes with Suspense support. If your
read
function is async, it will suspend behind the scenes, and you wouldn't need to care async state in your code.Notes about Suspense
We use the undocumented behavior of "Suspense for Lazy Loading" for any async.
"Suspense for Data Fetching" is still to be finalized.
Hence, this feature is technically unstable. We try our best to keep the API when it migrates.
Integrations
Jotai comes with various integrations. Some of them are complete, some are preliminary.
jotai/immer
: immer integrationjotai/optics
: optics-ts integrationjotai/query
: react-query integrationjotai/xstate
: xstate integrationjotai/valtio
: valtio integrationjotai/zustand
: zustand integrationjotai/redux
: redux integrationMoving forward
The core API should be stable for React 16.8 and above.
All major issues are resolved, and if there is a bug by chance, we will fix it as soon as possible.
We will be adding more utility functions on top of core, and your use cases would be important. Free free to open a new discussion.
We are already working on new integrations for urql and rxjs. We have a plan to work on dedicated integration for nextjs.
When React releases a new version with Suspense and Concurrent support, we will start working on the next major version. Our hope is to keep the API compatible.
Notes about Versioning
We follow semantic versioning for core
jotai
.Note that type-only changes and sub bundles
jotai/*
don't strictly follow the semver.Please check release notes for details.
The text was updated successfully, but these errors were encountered: