|
@@ -5,7 +5,7 @@ export const metadata = pageMetadata("docs/changelog")
|
|
|
|
|
|
|
|
Notable changes and updates to json-render.
|
|
Notable changes and updates to json-render.
|
|
|
|
|
|
|
|
-## v0.8.0
|
|
|
|
|
|
|
+## v0.9.0
|
|
|
|
|
|
|
|
February 2026
|
|
February 2026
|
|
|
|
|
|
|
@@ -13,8 +13,17 @@ February 2026
|
|
|
|
|
|
|
|
The `StateStore` interface lets you plug in your own state management (Redux, Zustand, Jotai, XState, etc.) instead of the built-in internal store. Pass a `store` prop to `StateProvider`, `JSONUIProvider`, or `createRenderer` for controlled mode.
|
|
The `StateStore` interface lets you plug in your own state management (Redux, Zustand, Jotai, XState, etc.) instead of the built-in internal store. Pass a `store` prop to `StateProvider`, `JSONUIProvider`, or `createRenderer` for controlled mode.
|
|
|
|
|
|
|
|
|
|
+- Added `StateStore` interface and `createStateStore()` factory to `@json-render/core`
|
|
|
|
|
+- `StateProvider`, `JSONUIProvider`, and `createRenderer` now accept an optional `store` prop
|
|
|
|
|
+- When `store` is provided, it becomes the single source of truth (`initialState`/`onStateChange` are ignored)
|
|
|
|
|
+- When `store` is omitted, everything works exactly as before (fully backward compatible)
|
|
|
|
|
+- Applied across all platform packages: react, react-native, react-pdf
|
|
|
|
|
+- Store utilities (`createStoreAdapter`, `immutableSetByPath`, `flattenToPointers`) available via `@json-render/core/store-utils` for building custom adapters
|
|
|
|
|
+
|
|
|
New adapter packages: `@json-render/redux`, `@json-render/zustand`, `@json-render/jotai`.
|
|
New adapter packages: `@json-render/redux`, `@json-render/zustand`, `@json-render/jotai`.
|
|
|
|
|
|
|
|
|
|
+See the [Data Binding](/docs/data-binding#external-store-controlled-mode) guide for usage.
|
|
|
|
|
+
|
|
|
### Changed: `onStateChange` signature updated (breaking)
|
|
### Changed: `onStateChange` signature updated (breaking)
|
|
|
|
|
|
|
|
The `onStateChange` callback now receives a single array of changed entries instead of being called once per path. This makes batch updates via `update()` easier to handle:
|
|
The `onStateChange` callback now receives a single array of changed entries instead of being called once per path. This makes batch updates via `update()` easier to handle:
|
|
@@ -29,6 +38,31 @@ onStateChange?: (changes: Array<{ path: string; value: unknown }>) => void
|
|
|
|
|
|
|
|
The callback is only called when a `set()` or `update()` call actually changes the state. A `set()` call produces a single-element array; an `update()` call produces one array with all changed paths.
|
|
The callback is only called when a `set()` or `update()` call actually changes the state. A `set()` call produces a single-element array; an `update()` call produces one array with all changed paths.
|
|
|
|
|
|
|
|
|
|
+### Fixed: Server-safe schema import
|
|
|
|
|
+
|
|
|
|
|
+`@json-render/react` barrel-imports React contexts that call `createContext`, which crashes in Next.js App Router API routes (RSC runtime strips `createContext`). All docs, examples, and skills now import `schema` from `@json-render/react/schema` instead of `@json-render/react`.
|
|
|
|
|
+
|
|
|
|
|
+For combined imports, split into separate `schema` (subpath) and client API (main entry) lines:
|
|
|
|
|
+
|
|
|
|
|
+```ts
|
|
|
|
|
+import { schema } from "@json-render/react/schema";
|
|
|
|
|
+import { defineRegistry, Renderer } from "@json-render/react";
|
|
|
|
|
+```
|
|
|
|
|
+
|
|
|
|
|
+### Fixed: Chaining actions
|
|
|
|
|
+
|
|
|
|
|
+Fixed an issue where chaining multiple actions on the same event (e.g. `setState` followed by a custom action) did not execute all actions. Affected `@json-render/react`, `@json-render/react-native`, and `@json-render/react-pdf`.
|
|
|
|
|
+
|
|
|
|
|
+### Fixed: Zod array inner type resolution
|
|
|
|
|
+
|
|
|
|
|
+Fixed safely resolving the inner type for Zod arrays in schema introspection, preventing errors when catalog component props use `z.array()`.
|
|
|
|
|
+
|
|
|
|
|
+---
|
|
|
|
|
+
|
|
|
|
|
+## v0.8.0
|
|
|
|
|
+
|
|
|
|
|
+February 2026
|
|
|
|
|
+
|
|
|
### New: `@json-render/react-pdf`
|
|
### New: `@json-render/react-pdf`
|
|
|
|
|
|
|
|
PDF renderer for json-render, powered by [`@react-pdf/renderer`](https://react-pdf.org/). Define catalogs and registries the same way as `@json-render/react`, but output PDF documents instead of web UI.
|
|
PDF renderer for json-render, powered by [`@react-pdf/renderer`](https://react-pdf.org/). Define catalogs and registries the same way as `@json-render/react`, but output PDF documents instead of web UI.
|