Repository navigation
Conversation
RenderSpec now reports `lifecycle` events through onEvent, as Angular's render-spec and render-element do: the tree and each element mounting and being destroyed, with the element key and type. An element mounts when its view renders, so a hidden element mounts once it is visible. createRenderLifecycle() is the React counterpart of RENDER_LIFECYCLE: it turns those events into the first mount, mount count, latest mount, latest state change and latest action, readable with useSyncExternalStore. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
blove
enabled auto-merge
November 16, 2026 19:53
blove
added this pull request to the merge queue
Nov 17, 2026
Any commits made after this event will not be merged.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Angular
<render-spec>emitslifecycleevents (spec and element, mounted and destroyed;render-event.ts,render-spec.component.ts:263,render-element.component.ts:199,239) andprovideRenderexposesRENDER_LIFECYCLEtimings. ReactRenderSpecreported only handler, stateChange and result events.Changes
RenderEventgainsRenderLifecycleEvent(event,scope, andelementKey/elementTypefor elements), reported throughonEvent.mountedanddestroyed.visiblemounts once it becomes visible and reportsdestroyedwhen hidden again. A replaced element type reports one leaving and another mounting. An unregistered type reports nothing. Difference from Angular: Angular reports a hidden element as mounted, because its host component exists; here a mount means a view is on screen.destroyednotifications still arrive as the tree unmounts.createRenderLifecycle()(new export) is the counterpart ofRENDER_LIFECYCLE:firstMountAt,mountCount,lastMountAt,lastStateChangeAtandlastHandlerInvokedAt, with frozen snapshots andsubscribe/getSnapshotforuseSyncExternalStore. Thedestroyedevents don't count, as in Angular.lifecycle.ts;createRenderLifecycleadded to thereact/renderruntime export allowlist and its spec.Verification
lifecycle.spec.tsx, 9 tests. Removing the elementmountedreport fails 5 of them.npx nx run-many -t test,type-tests,lint -p react: 81 files / 1,394 tests pass, 0 lint errors.content,core,react:inventory --check --drift warn,verify-boundaries,verify-packages(script plus its 102-test spec),verify-render-stateandverify-react-readinesspass; the boundaries and inventory specs pass too.🤖 Generated with Claude Code