Skip to content

feat: integrate @sigrea/core v0.5.0 mount lifecycle#16

Merged
aose-yuu merged 11 commits into
mainfrom
feat/molecule-mount-lifecycle
Jan 9, 2026
Merged

feat: integrate @sigrea/core v0.5.0 mount lifecycle#16
aose-yuu merged 11 commits into
mainfrom
feat/molecule-mount-lifecycle

Conversation

@aose-yuu
Copy link
Copy Markdown
Contributor

@aose-yuu aose-yuu commented Jan 9, 2026

Purpose

Integrates @sigrea/core v0.5.0 mount lifecycle APIs for precise control over molecule side effects.

Summary

Core Integration

  • Upgrade to @sigrea/core ^0.5.0 with mount/unmount/dispose lifecycle
  • Implement useIsomorphicLayoutEffect for Vue3-aligned timing (browser) and SSR safety (Node.js)
  • Mount molecules synchronously after DOM updates but before paint in browsers
  • Defer to useEffect in SSR environments to avoid hydration warnings

Documentation

  • Add detailed lifecycle timing explanation for useMolecule
  • Document SSR behavior and browser environment differences
  • Replace "Sigrea" with "Mendako" in code examples for consistency

Testing

  • Add mount lifecycle verification tests (3 new tests)
  • Verify onMount is called after component mount
  • Verify watch execution is deferred until after mount
  • Verify watch callbacks execute when signals change post-mount
  • All 12 tests passing

Dependencies

  • Update baseline-browser-mapping to latest (2.9.13)

Verification

  • mise run ci

- Replace "Sigrea" with "Mendako" in code examples to match core
- Add detailed lifecycle timing explanation for useLayoutEffect/useEffect
- Document SSR behavior and browser environment differences
- Clarify when onMount and watch effects activate relative to paint
- Add useMolecule.mount-lifecycle.test.ts to verify mount timing
- Test that onMount is called after component mount
- Test that watch execution is deferred until after mount
- Test that watch callbacks execute when signals change post-mount
- Update baseline-browser-mapping to latest version
@aose-yuu aose-yuu changed the title Feat/molecule mount lifecycle feat: integrate @sigrea/core v0.5.0 mount lifecycle Jan 9, 2026
@aose-yuu aose-yuu marked this pull request as ready for review January 9, 2026 08:44
@aose-yuu aose-yuu closed this Jan 9, 2026
@aose-yuu aose-yuu reopened this Jan 9, 2026
@aose-yuu aose-yuu merged commit 6b797df into main Jan 9, 2026
1 check passed
@aose-yuu aose-yuu deleted the feat/molecule-mount-lifecycle branch January 9, 2026 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant