{"id":557074,"date":"2026-07-24T08:19:11","date_gmt":"2026-07-24T08:19:11","guid":{"rendered":"https:\/\/www.newsbeep.com\/il\/557074\/"},"modified":"2026-07-24T08:19:11","modified_gmt":"2026-07-24T08:19:11","slug":"jotai-v2-20-rework-store-building-blocks-for-high-throughput-performance-and-sets-the-stage-for-v3","status":"publish","type":"post","link":"https:\/\/www.newsbeep.com\/il\/557074\/","title":{"rendered":"Jotai v2.20: Rework Store Building Blocks for High-Throughput Performance and Sets the Stage for v3"},"content":{"rendered":"<p><a href=\"https:\/\/jotai.org\/\" rel=\"nofollow noopener\" target=\"_blank\">Jotai<\/a>, the atomic state management library for React created by Daishi Kato, has <a href=\"https:\/\/github.com\/pmndrs\/jotai\/releases\/tag\/v2.20.0\" rel=\"nofollow noopener\" target=\"_blank\">released Jotai v2.20.0<\/a>, a performance-focused update that reworks the library&#8217;s internal store building blocks and clears the runway for a future Jotai v3.<\/p>\n<p>Jotai v2.20.0 centres on a single theme: improving performance in high-throughput scenarios. The release credits core contributor <a href=\"https:\/\/github.com\/dmaskasky\" rel=\"nofollow noopener\" target=\"_blank\">David Maskasky<\/a> and lands a small set of internal changes, including avoiding the getInternalBuildingBlock function (<a href=\"https:\/\/github.com\/pmndrs\/jotai\/pull\/3293\" rel=\"nofollow noopener\" target=\"_blank\">#3293<\/a>), Rev3 type narrowing for onMount hooks (<a href=\"https:\/\/github.com\/pmndrs\/jotai\/pull\/3311\" rel=\"nofollow noopener\" target=\"_blank\">#3311<\/a>), and lazy hooks in ensureAtomState for new atom state (<a href=\"https:\/\/github.com\/pmndrs\/jotai\/pull\/3313\" rel=\"nofollow noopener\" target=\"_blank\">#3313<\/a>).<\/p>\n<p>The change has a long history. As Kato explained in his <a href=\"https:\/\/newsletter.daishikato.com\/p\/jotai-v2-20-0-and-the-store-building-blocks\" rel=\"nofollow noopener\" target=\"_blank\">Read the Code newsletter<\/a>, the building blocks idea first arrived in <a href=\"https:\/\/github.com\/pmndrs\/jotai\/releases\/tag\/v2.12.0\" rel=\"nofollow noopener\" target=\"_blank\">v2.12.0<\/a> more than a year ago, exposing some internals so that ecosystem libraries such as jotai-effect and jotai-scope could extend Jotai&#8217;s core. Rather than letting the store be extended after creation, which he worried could cause mismatched capabilities over time, Kato chose to accept customisation at the moment a store is built. He wrote that the API became both flexible and safe, or hard to misuse, around v2.15.0.<\/p>\n<p>That flexibility came at a cost. Someone reported a performance regression, and the major reason was the use of WeakMap, which had been introduced to make the building blocks more flexible (<a href=\"https:\/\/github.com\/pmndrs\/jotai\/pull\/3280\" rel=\"nofollow noopener\" target=\"_blank\">#3280<\/a>). The fix swaps the WeakMap approach for passing everything as parameters instead. Kato described the solution as &#8220;not super clean, but fits with my mental model,&#8221; and framed the release as the last step before he starts thinking seriously about Jotai v3.<\/p>\n<p>For most developers the everyday API is untouched. Creating and using a store looks exactly as it did before.<\/p>\n<p>The breaking label applies to the internal building blocks used by library authors, not to typical application code. The impact is visible downstream, where <a href=\"https:\/\/github.com\/jotaijs\/jotai-devtools\/blob\/main\/CHANGELOG.md\" rel=\"nofollow noopener\" target=\"_blank\">jotai-devtools v0.14.0<\/a> added support for INTERNAL_buildStoreRev3 and dropped older versions to stay compatible. Teams still on Jotai v1 should consult the official <a href=\"https:\/\/jotai.org\/docs\/guides\/migrating-to-v2-api\" rel=\"nofollow noopener\" target=\"_blank\">v2 migration guide<\/a>, and those relying on atomFamily should note it is <a href=\"https:\/\/jotai.org\/docs\/utilities\/family\" rel=\"nofollow noopener\" target=\"_blank\">deprecated ahead of v3<\/a> in favour of the jotai-family package. Two follow-up patches have already shipped, <a href=\"https:\/\/github.com\/pmndrs\/jotai\/releases\/tag\/v2.20.1\" rel=\"nofollow noopener\" target=\"_blank\">v2.20.1<\/a> and <a href=\"https:\/\/github.com\/pmndrs\/jotai\/releases\/tag\/v2.20.2\" rel=\"nofollow noopener\" target=\"_blank\">v2.20.2<\/a>, addressing further edge cases.<\/p>\n<p>Direct community reaction to the point release has been muted, in keeping with its under the hood nature, though the longer running <a href=\"https:\/\/github.com\/pmndrs\/jotai\/discussions\/2889\" rel=\"nofollow noopener\" target=\"_blank\">ideas for v3<\/a> discussion continues to draw contributors. In that thread Kato has outlined a v3 plan that explicitly includes a redesign of the building blocks array structure, the very internals this release touches, alongside dropping CommonJS builds, dropping support for React below 18, and removing the setSelf option.<\/p>\n<p>Those proposals have drawn comments, with one contributor focusing on the dropping of CJS:<\/p>\n<p>&#13;<\/p>\n<p>Regarding dropping CJS &#8211; I don&#8217;t think this should even be a question. 99,9999% of Jotai users are using some kind of bundler, all of which support ESM just fine. The remaining 0,0001% would be users using pure ESM modules, in which case&#8230; Well&#8230; They&#8217;re using ESM modules \ud83d\ude00<\/p>\n<p>&#13;<\/p>\n<p>Kato&#8217;s reply highlights\u00a0that server-side rendering users still need to be considered. Suggestions to loosen Jotai&#8217;s coupling with React and court other frameworks were met with a firmly React-first stance.<\/p>\n<p>In the wider landscape, Jotai remains the leading atomic option while sitting behind Kato&#8217;s own <a href=\"https:\/\/github.com\/pmndrs\/zustand\" rel=\"nofollow noopener\" target=\"_blank\">Zustand<\/a> in raw downloads. The project&#8217;s own <a href=\"https:\/\/jotai.org\/docs\/basics\/comparison\" rel=\"nofollow noopener\" target=\"_blank\">comparison<\/a> frames Jotai as bottom-up atoms akin to Recoil, whereas Zustand offers a single top-down store closer to Redux, and Kato&#8217;s proxy-based Valtio targets a different mental model again.<\/p>\n<p>Jotai is open source under the MIT license and can be installed from <a href=\"https:\/\/www.npmjs.com\/package\/jotai\" rel=\"nofollow noopener\" target=\"_blank\">npm<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"Jotai, the atomic state management library for React created by Daishi Kato, has released Jotai v2.20.0, a performance-focused&hellip;\n","protected":false},"author":2,"featured_media":557075,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[114,4407,85,46,3306,252513,44829,44831,7390],"class_list":["post-557074","post","type-post","status-publish","format-standard","has-post-thumbnail","category-business","tag-business","tag-development","tag-il","tag-israel","tag-javascript","tag-jotai-rework-performance","tag-react","tag-typescript","tag-web-development"],"_links":{"self":[{"href":"https:\/\/www.newsbeep.com\/il\/wp-json\/wp\/v2\/posts\/557074","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.newsbeep.com\/il\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.newsbeep.com\/il\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/il\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/il\/wp-json\/wp\/v2\/comments?post=557074"}],"version-history":[{"count":0,"href":"https:\/\/www.newsbeep.com\/il\/wp-json\/wp\/v2\/posts\/557074\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/il\/wp-json\/wp\/v2\/media\/557075"}],"wp:attachment":[{"href":"https:\/\/www.newsbeep.com\/il\/wp-json\/wp\/v2\/media?parent=557074"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.newsbeep.com\/il\/wp-json\/wp\/v2\/categories?post=557074"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.newsbeep.com\/il\/wp-json\/wp\/v2\/tags?post=557074"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}