Skip to content

Commit

Permalink
docs: more explicit defineComponent example (#3075)
Browse files Browse the repository at this point in the history
  • Loading branch information
uptownhr committed May 8, 2021
1 parent 0a51fb3 commit eee81aa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/plugin-vue-jsx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ This plugin supports HMR of Vue JSX components. The detection requirements are:
import { defineComponent } from 'vue'

// named exports w/ variable declaration: ok
export const Foo = defineComponent(...)
export const Foo = defineComponent({})

// named exports referencing variable declaration: ok
const Bar = defineComponent(...)
const Bar = defineComponent({ render() { return <div>Test</div> }})
export { Bar }

// default export call: ok
export default defineComponent(...)
export default defineComponent({ render() { return <div>Test</div> }})

// default export referencing variable declaration: ok
const Baz = defineComponent(...)
const Baz = defineComponent({ render() { return <div>Test</div> }})
export default Baz
```

Expand Down

0 comments on commit eee81aa

Please sign in to comment.