@expressive/react 0.94.1 → 0.94.2

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
@@ -6,12 +6,12 @@
6
6
 
7
7
  <p align="center">
8
8
  <a href="https://www.npmjs.com/package/@expressive/react"><img alt="NPM" src="https://badge.fury.io/js/%40expressive%2Freact.svg"></a>
9
- <a href="https://github.com/gabeklein/expressive-mvc/actions/workflows/coverage.yml"><img alt="Coverage" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fgabeklein%2Fexpressive-mvc%2Fbadges%2Fcoverage.json"></a>
9
+ <a href="https://github.com/gabeklein/expressive/actions/workflows/coverage.yml"><img alt="Coverage" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fgabeklein%2Fexpressive%2Fbadges%2Fcoverage.json"></a>
10
10
  </p>
11
11
 
12
12
  ---
13
13
 
14
- The React adapter for [Expressive MVC](https://github.com/gabeklein/expressive-mvc). Define state as a class, render it as a component, and reads automatically subscribe - components re-render only when accessed values change.
14
+ The React adapter for [Expressive MVC](https://github.com/gabeklein/expressive). Define state as a class, render it as a component, and reads automatically subscribe - components re-render only when accessed values change.
15
15
 
16
16
  ```bash
17
17
  npm install @expressive/mvc @expressive/react
@@ -100,7 +100,7 @@ class DarkModeSwitch extends Toggle {
100
100
  }
101
101
  ```
102
102
 
103
- The base owns behavior and structure; subclasses author only the rendering. Override a subcomponent as a **method** when it takes no props, or as an **arrow field** when you want its props type inferred from the base - which is how `@expressive/router`'s [`NavLinks`](https://github.com/gabeklein/expressive-mvc/blob/main/packages/router/README.md#generated-navigation) exposes its overridable `Item` / `List` / `Group` members.
103
+ The base owns behavior and structure; subclasses author only the rendering. Override a subcomponent as a **method** when it takes no props, or as an **arrow field** when you want its props type inferred from the base - which is how `@expressive/router`'s [`NavLinks`](https://github.com/gabeklein/expressive/blob/main/packages/router/README.md#generated-navigation) exposes its overridable `Item` / `List` / `Group` members.
104
104
 
105
105
  A subclass `render()` replaces the base's like any method - `super.render(props)` wraps it.
106
106
 
@@ -207,7 +207,7 @@ function Profile() {
207
207
  - **`<Component for={Model}>`** - explicit hierarchical dependency injection.
208
208
  - **Suspense & error boundaries** - async values suspend; `catch()` handles child errors.
209
209
 
210
- Full guide and API reference → **[github.com/gabeklein/expressive-mvc](https://github.com/gabeklein/expressive-mvc)**
210
+ Full guide and API reference → **[github.com/gabeklein/expressive](https://github.com/gabeklein/expressive)**
211
211
 
212
212
  ## License
213
213
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expressive/react",
3
- "version": "0.94.1",
3
+ "version": "0.94.2",
4
4
  "description": "Class-based reactive state for React. Define state and logic as plain classes; components update when the values they read change.",
5
5
  "keywords": [
6
6
  "expressive",
@@ -22,10 +22,11 @@
22
22
  },
23
23
  "repository": {
24
24
  "type": "git",
25
- "url": "git+https://github.com/gabeklein/expressive-mvc.git"
25
+ "url": "git+https://github.com/gabeklein/expressive.git"
26
26
  },
27
27
  "files": [
28
- "dist"
28
+ "dist",
29
+ "skills"
29
30
  ],
30
31
  "type": "module",
31
32
  "sideEffects": [
@@ -63,7 +64,7 @@
63
64
  "test": "bun run typecheck && bun run coverage"
64
65
  },
65
66
  "devDependencies": {
66
- "@expressive/mvc": "^0.94.0",
67
+ "@expressive/mvc": "^0.94.2",
67
68
  "@testing-library/react": "^16.3.0",
68
69
  "@types/react": "^19",
69
70
  "@types/react-dom": "^19",
@@ -75,7 +76,7 @@
75
76
  "vite": "^7.3.1"
76
77
  },
77
78
  "peerDependencies": {
78
- "@expressive/mvc": "^0.94.0",
79
+ "@expressive/mvc": "^0.94.2",
79
80
  "react": ">=16.14.0 <20.0.0",
80
81
  "vite": ">=5"
81
82
  },
@@ -0,0 +1,14 @@
1
+ ---
2
+ name: expressive-react
3
+ description: React host for Expressive MVC (@expressive/react) - Component classes as React components, <Component for> providers, Model.get() in function components. Use when writing React views over Expressive state, migrating hooks (useState/useEffect/useMemo/useContext) to classes, fixing prop drilling, or reviewing such a refactor. Pair with the expressive-mvc skill for the core Model API.
4
+ ---
5
+
6
+ # Expressive MVC - React
7
+
8
+ `@expressive/react` is the React host. Ownership decisions, the golden-path summary and the core API are in [expressive-mvc](../expressive-mvc/SKILL.md) - read it first. **Read [refactor.md](refactor.md) in full before any hook-migration or refactor task.**
9
+
10
+ - [refactor.md](refactor.md) - the refactor algorithm expanded: ownership triage, mechanical-setter and prop-drilling anti-patterns, single-consumer getters, dependency snapshots and conditional subscriptions, presence boundaries, restrained `is`, subcomponent overuse, extract-then-consolidate, review checklist
11
+ - [expressive-mvc/style.md](../expressive-mvc/style.md) - style profile: snapshot formatting, affirmative conditions, render fallthrough vs operational guards
12
+ - [react.md](react.md) - Model.get() (optional lookup, presence boundaries, custom lookup), effects at commit, providing state, transparent writes, SSR, React Native, Vite hot reload
13
+ - [expressive-mvc/component.md](../expressive-mvc/component.md) - Component class, props, children, extending a base, subcomponent extension points, Suspense, transitions, error boundaries
14
+ - [patterns.md](patterns.md) - Recipes: forms, async, domain-row and form-chip pools, region controls, router bridge, host-agnostic domain model + view adapter, presence boundary, contextual children, debounce, async effects, awaiting a pending value, effects