Skip to content

Conversation

skirtles-code
Copy link
Contributor

The current example that introduces defineComponent is not using an SFC. This seems to be causing some confusion, so I've added an extra example that shows the SFC equivalent. The jump from const Component = to export default seems to be one that beginners struggle to make when referring to this page of the docs (based on what I've observed on Discord).

SFCs are already discussed earlier on the page, so this isn't introducing a new concept.

I would also note that the two examples at the bottom of the page suddenly switch to using export default. While that doesn't necessarily mean they are SFCs, I think that switch is potentially confusing for anyone trying to follow along. I don't know whether my new example helps much but at least it establishes export default as a relevant concept.

@NataliaTepluhina NataliaTepluhina merged commit 8eaf11b into vuejs:master Feb 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants