home.social

#jotai — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #jotai, aggregated by home.social.

fetched live
  1. #Jotai v2.20.0 is out, bringing performance improvements for high-throughput workloads and fixing previous regressions.

    The release updates internal building blocks without changing the day-to-day API, though library authors should be aware of new deprecations as work toward Jotai v3 begins.

    Read more ➜ bit.ly/4yIvKy9

    #React #WebDevelopment #InfoQ

  2. Подходы к state management в React

    У React-разработчика две беды: 1. Целевые данные изменились, а ререндера нет. 2. Целевые данные не изменились, а ререндер есть. Есть много вариантов подружить данные с интерфейсом, в рамках данной статьи я пройдусь по самым популярным из них. Выясним, как они устроены и для чего каждый из них подойдет лучше, обсудим конкретные реализации разных паттернов.

    habr.com/ru/articles/984424/

    #React #redux #zustand #mobx #valtio #jotai #state_management

  3. Как создавали Jotai

    Устали использовать Redux / Zustand / Jotai как чёрный ящик? Хотите наконец понять, что за магия там под капотом? Мне самому надоело вайбкодить синтаксис Redux-like библиотек. Пора уже понять чё за зверь такой – state manager. Это заняло у меня несколько месяцев, и сейчас пройдём этот путь вместе. Буквально изобретём концепцию Jotai за семь дней.

    habr.com/ru/articles/967748/

    #reactjs #хуки #jotai

  4. After spending the whole day reversing @sitnik_en's logux, I finally figured out how they solve the problem of the log store. They don’t, lol. There are some mentions of Redis in the commercial version, though.

    I spent a bit too much time on this project; will have to wrap the story up soon. The TL;DR insofar was that #Jotai is a more straightforward state management than #nanostores and is **by far** better documented. It's easy to get up and running, easy to scale. It fits the medium-sized scope better than Valtio (just as I thought). It feels somewhat close to ClojureScript state management, which I still find ideal.

    Having an app with shared state and local state is a pain either way. You can’t easily make Loro, Jotai, and React friends. You’ll make sacrifices. In the end, the reasonable approach seems to be to batch local changes in, e.g. Jotai and sync them up to Loro. I didn’t try Automerge yet, but both are Rust WASM. Loro has some very readable source code (I might be biased towards Rust, but Logux is hard to follow), though.

    Aaaand there goes my weekend. I should totally get back into ZFS poking; all this frontend mess makes me crave the sanity of good old C.

    #frontend

  5. I’ve reached enough complexity in my hobby app where valtio becomes a liability. Having a single global mutating state felt weird and yeah, it scales weird. The question is, of course, what lesson did I learn?

    Probably that cljs had extremely good solutions when it came to state management.

    Either way, I’m eyeing #nanostores and #jotai now.

    #frontend #react

  6. Did you know I previously wrote a book about Zustand, Jotai, and Valtio? I think the content is still relevant (at least until the React Compiler lands 🙃).

    In case you missed it, you can find the link on my site 👉 daishikato.com

  7. Check out our new kid in the Jotai ecosystem: jotai-history.

    Give it a try and share your feedback!

    github.com/jotaijs/jotai-histo

  8. Zustand seems more popular than Jotai right now. So, I experimented with creating a Zustand-flavored wrapper around Jotai. If I can get some feedback from this, I’d consider it a success!

    GitHub 👉 github.com/jotaijs/jotai-zusta
    Demo 👉 stackblitz.com/github/jotaijs/

  9. Hi, can anyone, who is familiar with functional programming, read, review and share your feedback please?

    jotai.org/docs/basics/function

  10. Just released jotai-suspense v0.4.0! github.com/jotaijs/jotai-suspe

    This version includes `useAtomValue` hook. The name is the same as the one in `jotai`, but unlike the original one, this doesn't resolve promises. You need to explicitly use React 19 `use` hook or `react18-use` lib.

  11. Have you experienced hydration errors with @JotaiJS and @NextJS?

    We have a new library to tackle the SSR integration with Jotai. Please give your feedback.

    Repo: github.com/jotaijs/jotai-ssr

  12. ⭐️ Jotai jotai.org has reached 18k stars on GitHub! Huge thanks to our amazing community for all the support. Let's keep improving it together!

  13. jotai-scope v0.7.0 has been released! I started it as a proof-of-concept project, but it now has two maintainers and this version is more stable than ever!

    ScopeProvider is used to scope atoms. It's a capability often requested by Jotai users.

    github.com/jotaijs/jotai-scope

  14. jotai-xstate v0.5.0 has been released! It finally migrates to XState V5. Huge thanks to the contributors!

    Now, we may need to update the docs and examples. Would anyone like to volunteer?

    github.com/jotaijs/jotai-xstate

  15. Jotai is basically modeled after useState, which is reactive. However, you might want to read atom values without being reactive, like in a game app.

    Just released jotai-game v0.2.0, an experimental library providing `useTransientAtom`.

    github.com/jotaijs/jotai-game

  16. There is another subtle difference between TC39 signals and Jotai atoms:
    - TC39 signals are pull-based (lazy evaluation)
    - Jotai atoms are a mix (but not a combination) of push and pull (For mounted atoms, eager eval; otherwise, lazy eval. This is to avoid React rerenders.)

  17. jotai-zustand v0.4.0 has been released!
    This library allows you to create a @JotaiJS atom that is connected to a Zustand store. It's introduced for global access, but as Jotai v2 has the Store API, I'm not sure of the use cases. 😉

    github.com/jotaijs/jotai-zusta

  18. Just released jotai-xstate v0.4.0! This is a @JotaiJS library for XState. The atomWithMachine utility creates an atom with a machine.

    Unfortunately, this version is still for XState v4. We're looking for a maintainer who can also work on migrating to v5.

    github.com/jotaijs/jotai-xstate

  19. jotai-valtio v0.5.0 has been released! This library brings Valtio capabilities to Jotai atoms. It might not be widely used at the moment, but it’s an interesting bit to learn!

    Repo: github.com/jotaijs/jotai-valtio
    Docs: jotai.org/docs/integrations/va 👻💊

  20. jotai-trpc v0.7.0 has been released! This is a binding library for @JotaiJS and @tRPCio. It can create an atom that connects to a vanilla tRPC client.

    The implementation is just a wrapper, so it's fairly stable. Check it out!

    github.com/jotaijs/jotai-trpc

  21. Just released jotai-suspense v0.3.0! This lesser-known library for @JotaiJS helps avoid suspense waterfalls. I'm wondering how to promote this library effectively.

    Repo 👉 github.com/jotaijs/jotai-suspe
    Demo 👉 stackblitz.com/github/jotaijs/

  22. jotai-signal v0.9.0 is here! This experimental library makes Jotai atoms feel like signals. It's not for production, but there are some interesting technical points. So, it's maintained for now.

    github.com/jotaijs/jotai-signal

  23. jotai-redux v0.3.0 has been published! This library allows you to define a Jotai atom that connects to a Redux store. It's fairly stable, but my guess is that nobody uses it. 😝

    github.com/jotaijs/jotai-redux

  24. jotai-recoil v0.2.0 has been released! This library allows you to create Jotai atoms connected to Recoil states. It's designed to help migrate from @RecoilJS to @JotaiJS.

    github.com/jotaijs/jotai-recoil

  25. jotai-optics v0.4.0 has been released! It's a binding library for Jotai and optics-ts, originally developed by merisbahti.

    I'm looking for someone interested in maintaining it. Familiarity with optics-ts is important.
    github.com/jotaijs/jotai-optics

  26. Just released jotai-immer v0.4.0! This library lets you define Jotai atoms with Immer.

    I'm looking for a collaborator to help maintain this library. Let me know if you're interested, especially if you use it in production. github.com/jotaijs/jotai-immer

  27. Found an interesting thread. reddit.com/r/reactjs/comments/

    Some people say Zustand is more intuitive and some other people say Jotai is more intuitive. I think that fact validates both exist.