mitosis
mitosis copied to clipboard
fix: issues for vue composition api
Description
Please provide the following information:
There were some issues with vue option.api="composition"
:
-
ref
wasn't imported when usinguseRef
hook without usinguseState
- Composition api always use
ref()
wihtout anyclass
-> we don't needthis.
, but we always use.value
-
ref
could benull
foruseRef
see: https://vuejs.org/guide/essentials/template-refs.html#accessing-the-refs
Make sure to follow the PR preparation steps in CONTRIBUTING.md before submitting your PR:
- [x] format the codebase: from the root, run
yarn fmt:prettier
. - [x] update all snapshots (in core & CLI): from the root, run
yarn test:update
- [x] add Changeset entry: from the root, run
yarn g:changeset
and follow the CLI instructions. Alternatively, use the Changeset Github Bot to create the file.