## Summary Bumps `effect-view` and `@effect-view/vite-plugin` to 0.4.0. ### ReactRuntime - `ReactRuntime` is now a `Pipeable` with `*Prototype` / `*ImplPrototype` split, like `Component`. - The `Provider` builds a `ManagedRuntime` for each mount and holds it in React state, so a remount builds the layer again and releases it on unmount. The runtime no longer exposes `runtime.runtime`, a public `layer` or a `memoMap` (breaking). - New `runtime.extend(layer)`: an extended runtime gives a subtree (for example a router layout and its routes) its own services, on top of the context of its parent. Its `Provider` is rendered below the parent's, and routes read it with `Component.withContext(component, extended.context)`. - `Component.withContext` throws a clear error when its context has no `Provider` above it. ### Refreshable components - Hot reload keeps the state of a component when only its body changed, and remounts it when its hooks changed (`Refreshable`, with `@effect-view/vite-plugin` updated accordingly). ### ScopeRegistry and Component - `ScopeRegistry` rework: `Ref` instead of `SubscriptionRef`, a monotonic clock, a sweeper that only wakes for earlier deadlines, `dispose` that waits for the scopes being closed (with a timeout). - `Component` and `Async` no longer depend on `Scope.Scope` in their types; scope handling for `React.Activity` and `useOnChange` fixed. - Benchmarks and tests for `ScopeRegistry`, `Async` and `Component`. ### Docs and example - New docs pages: "Extended Runtimes" and "Common patterns". - AI docs for `ReactRuntime` cover `extend`. - The example package has `/user` routes using an extended runtime. ## Notes - Tests migrated off `runtime.runtime` to `ReactRuntime.Provider`. - `reports/REACT_REFRESH_FEASIBILITY.md` is removed. --------- Co-authored-by: Julien Valverdé <julien.valverde@mailo.com> Reviewed-on: #83
20 lines
446 B
TypeScript
20 lines
446 B
TypeScript
import type { SidebarsConfig } from "@docusaurus/plugin-content-docs"
|
|
|
|
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
|
|
|
|
const sidebars: SidebarsConfig = {
|
|
docsSidebar: [
|
|
"getting-started",
|
|
"state-management",
|
|
"async",
|
|
"extended-runtimes",
|
|
"query",
|
|
"mutation",
|
|
"forms",
|
|
"common-patterns",
|
|
],
|
|
apiSidebar: [{ type: "autogenerated", dirName: "api" }],
|
|
}
|
|
|
|
export default sidebars
|