This repository was archived by the owner on May 3, 2018. It is now read-only.
This repository was archived by the owner on May 3, 2018. It is now read-only.
0.12 Plan - feedback welcome #158
Open
Description
Hi Vue.js users, here is a list of changes I'm planning for the 0.12 release. The goal is to remove some cruft in the API and make things more consistent across the board. The two new features have already been implemented in the dev
branch, and I will soon start doing 0.12 beta releases so people can try it out. The breaking changes are pretty much just ideas that I'd like to gather feedback for - in particular, let me know how hard do you think it would be for you to migrate your existing app if these changes went live.
New Features
- async components. Allows defining a component as a function that asynchronous resolves the component definition. This would enable easy lazy-loading mechanisms.
- one-way paramAttributes/props syntax (
prop="{{*onetime}}"
)
Breaking Changes
paramAttributes
renamed toprops
.- Intent to remove:
v-partial
and{{>partial}}
syntax. The partial concept is a legacy from string-based templates, and isn't particularly useful when everything should just be components. - Intent to remove:
v-with
syntax.- It allows the user to add arbitrary data fields to a child component, which may conflict with the child's default data. At the same time, the child needs to be more explicit about what it expects from the parent.
- It's also confusing to have two ways of doing the same thing. Everything should just be
props
(previouslyparamAttributes
). - The name
v-with
isn't super precise for what it does now: passing data down to a child. It is also a legacy from string templates that uses {{#with}} blocks to shift the data context.
- Intent to remove:
v-component
syntax.- Similar to
v-with
, it doesn't make much sense to have two ways of doing the same thing. Every component should just be a custom tag. - For dynamic components, use the special
<component is="{{view}}"></component>
syntax."component"
is a reserved component name. - It should no longer be required to have a hyphen in your component name in order to use it as a custom tag.
- Similar to
Intent to remove:replace
option. A component always replaces its placeholder node.Intent to remove:inherit
option. Prefer explicitly passing down props.
Metadata
Metadata
Assignees
Labels
No labels