Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(bridge-react): enable custom createRoot to support React v19 in @module-federation/bridge-react #3551

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

danpeen
Copy link
Contributor

@danpeen danpeen commented Feb 27, 2025

Description

feat(bridge-react): enable custom createRoot to support React v19 in @module-federation/bridge-react.

Related Issue

#3537

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated the documentation.

Copy link

changeset-bot bot commented Feb 27, 2025

🦋 Changeset detected

Latest commit: 8d65052

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

This PR includes changesets to release 29 packages
Name Type
@module-federation/bridge-react Patch
@module-federation/runtime Patch
@module-federation/enhanced Patch
@module-federation/rspack Patch
@module-federation/webpack-bundler-runtime Patch
@module-federation/sdk Patch
@module-federation/runtime-tools Patch
@module-federation/managers Patch
@module-federation/manifest Patch
@module-federation/dts-plugin Patch
@module-federation/third-party-dts-extractor Patch
@module-federation/devtools Patch
@module-federation/bridge-vue3 Patch
@module-federation/bridge-shared Patch
@module-federation/bridge-react-webpack-plugin Patch
@module-federation/modern-js Patch
@module-federation/retry-plugin Patch
@module-federation/data-prefetch Patch
@module-federation/rsbuild-plugin Patch
@module-federation/error-codes Patch
@module-federation/inject-external-runtime-core-plugin Patch
@module-federation/nextjs-mf Patch
@module-federation/node Patch
@module-federation/storybook-addon Patch
@module-federation/modernjsapp Patch
@module-federation/esbuild Patch
@module-federation/runtime-core Patch
@module-federation/utilities Patch
website-new 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

Copy link

netlify bot commented Feb 27, 2025

Deploy Preview for module-federation-docs ready!

Name Link
🔨 Latest commit 8d65052
🔍 Latest deploy log https://app.netlify.com/sites/module-federation-docs/deploys/67c173d4cfe99800089bacbb
😎 Deploy Preview https://deploy-preview-3551--module-federation-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

};
```

* 作用: 用于传递根组件
* `rootComponent`: 需要被远程加载的根组件
* `render`: 自定义渲染函数,用于自定义渲染逻辑
* `createRoot`: 自定义 createRoot 函数,用于自定义 React 根节点的创建方式,可用于兼容不同版本的 React 或实现特定的渲染行为
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be more advantageous to translate it into English, or keep both the code and comments in English? This way, we would reach a larger audience and also maintain a consistent language standard in the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@douglaszaltron Oh, I got what you mean. I think the thing is, I forgot the English document of this part! Yes you are right,you've made a very good point. We'll definitely add English docs for this part, and I think for english users we can just turn to the english version of the website and it will all be English documents. Thank again!

@douglaszaltron
Copy link
Contributor

douglaszaltron commented Feb 27, 2025

This is great, it solves one of my problems in a native way. 👏👏

@danpeen danpeen changed the title feat(bridge-react): enable custom createRoot in bridge-react feat(bridge-react): enable custom createRoot to support React v19 in @module-federation/bridge-react Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants