-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
refactor(platform-server): remove renderApplication
overload that accepts a component
#49463
Conversation
844fd89
to
04bac13
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
reviewed-for: fw-core, fw-platform-server, public-api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reviewed-for: public-api
nit: remove the entry in |
@JeanMeche, this API was never deprecated as it was in developer preview. |
function isBootstrapFn(value: unknown): value is() => Promise<ApplicationRef> { | ||
// We can differentiate between a component and a bootstrap function by reading `cmp`: | ||
return typeof value === 'function' && !getComponentDef(value); | ||
return _render(platform, bootstrap()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's amazing how simple the renderApplication
function became 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed 😀
1396d85
to
824e25f
Compare
824e25f
to
b61fc6d
Compare
b61fc6d
to
98a14bb
Compare
…ccepts a component This commit removes the `renderApplication` overload that accepts a root component as the first parameter. BREAKING CHANGE: `renderApplication` method no longer accepts a root component as first argument. Instead, provide a bootstrapping function that returns a `Promise<ApplicationRef>`. Before ```ts const output: string = await renderApplication(RootComponent, options); ``` Now ```ts const bootstrap = () => bootstrapApplication(RootComponent, appConfig); const output: string = await renderApplication(bootstrap, options); ```
… that accepts a component
98a14bb
to
e89fcf6
Compare
This PR was merged into the repository by commit 41f27ad. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This commit removes the
renderApplication
overload that accepts a root component as the first parameter.BREAKING CHANGE:
renderApplication
method no longer accepts a root component as first argument. Instead, provide a bootstrapping function that returns aPromise<ApplicationRef>
.Before
Now