Adjust `createApp` related API signatures
refactor: adjust `createApp` related API signatures
Adjust `createApp` related API signaturesrefactoradjust createapp related api signatures
Committed by yyx990803
commit message
refactor!: adjust `createApp` related API signatures
BREAKING CHANGE: `createApp` API has been adjusted.
- `createApp()` now accepts the root component, and optionally a props
object to pass to the root component.
- `app.mount()` now accepts a single argument (the root container)
- `app.unmount()` no longer requires arguments.
New behavior looks like the following:
``` js
const app = createApp(RootComponent)
app.mount('#app')
app.unmount()
```Editor assessment
A strong breaking-change message. The refactor type with no scope is defensible, and the subject announces that createApp-related signatures were adjusted. The BREAKING CHANGE footer states the impact precisely and enumerates the new argument behavior for createApp, mount, and unmount, then shows a short code sample illustrating migration. That is exactly the migration guidance the spec asks for. Header and footer are well formed, the imperative subject has no trailing period, and nothing is pasted. An exemplar for signaling and explaining a breaking API change.