@vue/composition-api
Advanced tools
Changelog
0.3.0
context.slots
not being available before render #84.The render
function returned from setup
no longer receives any parameters.
export default {
setup() {
return props => h('div', prop.msg);
},
};
export default {
setup(props) {
return () => h('div', prop.msg);
},
};
Changelog
0.2.1
Declare your expected prop types directly in TypeScript:
import { createComponent, createElement as h } from '@vue/composition-api';
interface Props {
msg: string;
}
const MyComponent =
createComponent <
Props >
{
props: {
msg: {}, // required by vue 2 runtime
},
setup(props) {
return () => h('div', props.msg);
},
};
Declare ref type in TypeScript:
const dateRef = ref < Date > new Date();
Fix createComponent
not working with import()
#81.
Fix inject
type declaration #83.
Changelog
0.2.0
computed
property is called immediately in reactive()
#79.onBeforeDestroy()
to onBeforeUnmount()
lifecycle-hooks.onCreated()
lifecycle-hooks.onDestroyed()
lifecycle-hooks.Changelog
0.1.0
The package has been renamed to @vue/composition-api
to be consistent with RFC.
The @vue/composition-api
reflects the Composition API RFC.