jotai-state-tree 1.7.5 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,6 +3,8 @@
3
3
  A MobX-State-Tree (MST) compatible state management library powered by [Jotai](https://jotai.org/).
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/jotai-state-tree.svg)](https://www.npmjs.com/package/jotai-state-tree)
6
+ [![CI](https://github.com/bmartel/jotai-state-tree/actions/workflows/release.yml/badge.svg)](https://github.com/bmartel/jotai-state-tree/actions/workflows/release.yml)
7
+ [![coverage](.github/badges/coverage.svg)](https://github.com/bmartel/jotai-state-tree/actions/workflows/release.yml)
6
8
  [![license](https://img.shields.io/github/license/bmartel/jotai-state-tree.svg)](LICENSE)
7
9
 
8
10
  `jotai-state-tree` combines the transactional, tree-structured state model of MobX-State-Tree with the lightweight, zero-leak, high-performance atomic updates of Jotai. It is designed to be an API-compatible, drop-in replacement for MobX-State-Tree, featuring perfect TypeScript type safety out of the box.
@@ -32,6 +34,24 @@ npm install jotai-state-tree jotai
32
34
 
33
35
  ---
34
36
 
37
+ ## React Native Compatibility
38
+
39
+ `jotai-state-tree` is fully compatible with React Native projects.
40
+
41
+ ### Prerequisites & JS Engine
42
+ - **React Native Version**: `>= 0.70` is required.
43
+ - **JavaScript Engine**: The library relies on native ES2021 `WeakRef` and `FinalizationRegistry` features for memory management. If you use the Hermes engine (default since React Native 0.70), it must be version `0.12.0` or newer.
44
+
45
+ ### Using the Router in React Native
46
+ When running in React Native (or any non-browser environment), the built-in state router automatically disables DOM/browser integration and behaves as a fully-featured **in-memory router**. It maintains a navigation history stack internally, enabling you to use:
47
+ - `push(path)` / `replace(path)`
48
+ - `go(delta)` / `goBack()` / `goForward()`
49
+ - `RouteView` to reactively render screen components based on the active path
50
+
51
+ This allows you to manage native navigation state trees with full time-travel, middleware, and action recording support!
52
+
53
+ ---
54
+
35
55
  ## Quick Start
36
56
 
37
57
  ```typescript