Skip to content

fix(micro-frontend): reuse native view registrations across bundles - #363

Merged
gronxb merged 1 commit into
v2from
codex/fix-micro-frontend-native-view-registration
Aug 21, 2026
Merged

fix(micro-frontend): reuse native view registrations across bundles#363
gronxb merged 1 commit into
v2from
codex/fix-micro-frontend-native-view-registration

Conversation

@gronxb

@gronxb gronxb commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • adapt the host-shared React Native component registry before remote evaluation
  • reuse an exact duplicate native view registration produced by separate bundle module caches
  • preserve every other native component registry error

Why

A retained React Native runtime can evaluate a native component wrapper once in the host bundle and again in a separately cached remote bundle. React Native rejects the second wrapper evaluation even though both bundles resolve the same host-shared registry.

Test

  • yarn workspace @granite-js/micro-frontend test (149 tests)
  • yarn workspace @granite-js/micro-frontend typecheck
  • yarn workspace @granite-js/micro-frontend build
  • targeted ESLint and Prettier checks
  • installed the pkg.pr.new preview in the frontend-mobile Shared consumer
  • deployed RN 0.84 Android/iOS Shared bundles with 0 errors and 0 warnings
  • reproduced the original sequential Android navigation before the fix, then verified the target screen renders and the duplicate-view invariant is absent with the preview

@changeset-bot

changeset-bot Bot commented Aug 21, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a3d4375

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 29 packages
Name Type
@granite-js/micro-frontend Patch
babel-preset-granite Patch
create-granite-app Patch
@granite-js/blur-view Patch
@granite-js/brownfield-module Patch
@granite-js/cli Patch
@granite-js/cookies Patch
@granite-js/screen Patch
@granite-js/image Patch
@granite-js/jest Patch
@granite-js/lottie Patch
@granite-js/mpack Patch
@granite-js/native Patch
@granite-js/naver-map Patch
@granite-js/plugin-core Patch
@granite-js/plugin-env Patch
@granite-js/plugin-hermes Patch
@granite-js/plugin-micro-frontend Patch
@granite-js/plugin-router Patch
@granite-js/plugin-rozenite Patch
@granite-js/plugin-sentry Patch
@granite-js/react-native Patch
@granite-js/style-utils Patch
@granite-js/utils Patch
@granite-js/video Patch
@granite-js/vitest Patch
@granite-js/deployment-manager Patch
@granite-js/forge-cli Patch
@granite-js/pulumi-aws Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Aug 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
granite-docs Ready Ready Preview Aug 21, 2026 10:14am

Request Review

@pkg-pr-new

pkg-pr-new Bot commented Aug 21, 2026

Copy link
Copy Markdown
@granite-js/deployment-manager

yarn add https://pkg.pr.new/@granite-js/deployment-manager@363.tgz

@granite-js/forge-cli

yarn add https://pkg.pr.new/@granite-js/forge-cli@363.tgz

@granite-js/pulumi-aws

yarn add https://pkg.pr.new/@granite-js/pulumi-aws@363.tgz

babel-preset-granite

yarn add https://pkg.pr.new/babel-preset-granite@363.tgz

@granite-js/blur-view

yarn add https://pkg.pr.new/@granite-js/blur-view@363.tgz

@granite-js/brownfield-module

yarn add https://pkg.pr.new/@granite-js/brownfield-module@363.tgz

@granite-js/cli

yarn add https://pkg.pr.new/@granite-js/cli@363.tgz

@granite-js/cookies

yarn add https://pkg.pr.new/@granite-js/cookies@363.tgz

create-granite-app

yarn add https://pkg.pr.new/create-granite-app@363.tgz

@granite-js/screen

yarn add https://pkg.pr.new/@granite-js/screen@363.tgz

@granite-js/image

yarn add https://pkg.pr.new/@granite-js/image@363.tgz

@granite-js/jest

yarn add https://pkg.pr.new/@granite-js/jest@363.tgz

@granite-js/lottie

yarn add https://pkg.pr.new/@granite-js/lottie@363.tgz

@granite-js/micro-frontend

yarn add https://pkg.pr.new/@granite-js/micro-frontend@363.tgz

@granite-js/mpack

yarn add https://pkg.pr.new/@granite-js/mpack@363.tgz

@granite-js/native

yarn add https://pkg.pr.new/@granite-js/native@363.tgz

@granite-js/naver-map

yarn add https://pkg.pr.new/@granite-js/naver-map@363.tgz

@granite-js/plugin-core

yarn add https://pkg.pr.new/@granite-js/plugin-core@363.tgz

@granite-js/plugin-env

yarn add https://pkg.pr.new/@granite-js/plugin-env@363.tgz

@granite-js/plugin-hermes

yarn add https://pkg.pr.new/@granite-js/plugin-hermes@363.tgz

@granite-js/plugin-micro-frontend

yarn add https://pkg.pr.new/@granite-js/plugin-micro-frontend@363.tgz

@granite-js/plugin-router

yarn add https://pkg.pr.new/@granite-js/plugin-router@363.tgz

@granite-js/plugin-rozenite

yarn add https://pkg.pr.new/@granite-js/plugin-rozenite@363.tgz

@granite-js/plugin-sentry

yarn add https://pkg.pr.new/@granite-js/plugin-sentry@363.tgz

@granite-js/react-native

yarn add https://pkg.pr.new/@granite-js/react-native@363.tgz

@granite-js/style-utils

yarn add https://pkg.pr.new/@granite-js/style-utils@363.tgz

@granite-js/utils

yarn add https://pkg.pr.new/@granite-js/utils@363.tgz

@granite-js/video

yarn add https://pkg.pr.new/@granite-js/video@363.tgz

@granite-js/vitest

yarn add https://pkg.pr.new/@granite-js/vitest@363.tgz

commit: a3d4375

@gronxb
gronxb merged commit 4f7aad6 into v2 Aug 21, 2026
9 checks passed
@gronxb
gronxb deleted the codex/fix-micro-frontend-native-view-registration branch August 21, 2026 12:51
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.

2 participants