mitosis icon indicating copy to clipboard operation
mitosis copied to clipboard

fix: issues for vue composition api

Open nmerget opened this issue 5 months ago • 3 comments

Description

Please provide the following information:

There were some issues with vue option.api="composition":

  • ref wasn't imported when using useRef hook without using useState
  • Composition api always use ref() wihtout any class -> we don't need this., but we always use .value
  • ref could be null for useRef 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.

nmerget avatar Sep 09 '24 14:09 nmerget