Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .changeset/memo-busting-props.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/trivial-owner-remainder.md

This file was deleted.

7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# legend-doctor

## 0.6.4

### Patch Changes

- 67ef894: Review props that a memoized child re-renders for. A `stabilize-memo-prop` candidate fires when an owner passes a `memo`, Legend `observer`, or MobX `observer` child, alone or composed with `forwardRef`, an inline function, object, array, or element, and the owner also renders for state or a `useValue` subscription the element never reads. The child is resolved through imports, re-exports, star exports, and default exports, and a `memo` with its own comparator is skipped. Project hooks are followed to the values they return. The finding names the props to wrap in `useCallback` or `useMemo` or to move to module scope, and lists every input whose identity stays unproven. It is always a candidate, because a child that reads a global its owner mutates before forcing a render needs those renders. Components the React Compiler compiles are skipped.
- e29e562: Keep state as React state when a `use-observable` or `move-state-down` cut would skip only a trivial owner render. Outside the leaf that reads or carries the value, fewer elements than a compact owner must remain, none repeated, each a host element or a resolved child that calls only built-in reads and renders unrepeated host elements, and the owner must call nothing but read-only projections and core React hooks. Work in event handlers, commit callbacks, deferred schedulers, and `useMemo` factories does not count, since it does not re-run on the update. Repeated leaves, custom-hook owners, keyed leaves, and context clusters keep their cut, and a cluster converts only when every member's remainder is trivial.

## 0.6.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "legend-doctor",
"version": "0.6.3",
"version": "0.6.4",
"description": "Read-only React analyzer that proves which useState and useEffect hooks waste renders, and the exact Legend State edit that cuts them.",
"keywords": [
"cli",
Expand Down