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

refact/create micro app #479

Merged
merged 3 commits into from
Dec 8, 2021
Merged

refact/create micro app #479

merged 3 commits into from
Dec 8, 2021

Conversation

maoxiaoke
Copy link
Collaborator

  • refact createMicroApp api

@maoxiaoke maoxiaoke changed the base branch from master to release/2.7.0 December 8, 2021 08:16
@maoxiaoke maoxiaoke requested a review from ClarkXia December 8, 2021 08:18
src/apps.ts Outdated

// Merge global configuration
const cfgs = globalConfiguration;
Object.keys(configuration || {}).forEach((key) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

注释下这里引用赋值的原因,也可以考虑重构成 单独的 Configuration 类,提供 get 和 set 的方法

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

这里预期不是引用赋值,虽然老代码是引用赋值,但不是预期行为

src/apps.ts Outdated

const appConfig = getAppConfig(appName);

if (!(appConfig && appName)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

!appConfg || !appName 可能会更清晰点,不存在 appConfig 或者 appName 的时候直接报错

@maoxiaoke maoxiaoke requested a review from ClarkXia December 8, 2021 10:16
@maoxiaoke maoxiaoke merged commit ea4ec31 into release/2.7.0 Dec 8, 2021
@delete-merged-branch delete-merged-branch bot deleted the refact/createMicroApp branch December 8, 2021 11:05
maoxiaoke added a commit that referenced this pull request Dec 9, 2021
* fix: 🐛 add missing props for lifecycles (#440)
* fix: 🐛 narrow import error (#467)
* docs: ✏️ upgrade vite-plugin-index-html usage (#462)
* feat: 🎸 `appHistory` and `<Link />` can both take state (#477)
* refact/create micro app (#479)
* feat/cache css (#374)
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