-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Global config and Global API reference #68
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
Conversation
I probably prefer the title "Application Config" and "Application API" respectively. Because in v3 it's possible to create more than one applications in the same page. So we could customize them separately. That's more like an application-level thing. |
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 the config part.
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 the API part. Thanks.
src/api/global-api.md
Outdated
app.component('my-component', { /* ... */ }) | ||
|
||
// retrieve a registered component (always return constructor) | ||
const MyComponent = app.component('my-component', {}) |
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.
const MyComponent = app.component('my-component', {}) | |
const MyComponent = app.component('my-component') |
Not sure this would work but I think there should be only one parameter for the getter mode.
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.
Unfortunately, if we skip the second parameter here, MyComponent will be undefined
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.
Hi, I forked your codesandbox demo and made some change to demo my idea: https://codesandbox.io/s/async-components-pbku4?file=/index.html
Seems it returns the registered component as well.
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.
Hi @NataliaTepluhina , not sure you have seen this. Is that helpful? I still think here it should be no second parameter for the getter. Thanks.
Co-Authored-By: Jinjiang <[email protected]>
Co-Authored-By: Jinjiang <[email protected]>
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.
Just left some phrasing suggestions, but thanks for starting to put this together! I imagine we'll have more ideas as time goes on, but I think it's good to go!
Co-Authored-By: Ben Hong <[email protected]>
Co-Authored-By: Ben Hong <[email protected]>
Translate src/guide/components/provide-inject.md
This PR adds two first parts to the API Reference