To start our component, we can create our Vue project with Vue CLI as learned in the 'Creating your first project with Vue CLI' recipe in Chapter 2, Introducing TypeScript and the Vue Ecosystem, or start a new one.
To start a new one, open Terminal (macOS or Linux) or Command Prompt/PowerShell (Windows) and execute the following command:
> vue create my-component
The command-line interface (CLI) will ask some questions that will help with the creation of the project. You can use the arrow keys to navigate, the Enter key to continue, and the spacebar to select an option. Choose the default option:
? Please pick a preset: (Use arrow keys)
❯ default (babel, eslint)
Manually select features
Let's create our first "hello world" component, following these steps:
- Let's create a new file called CurrentTime.vue file in the src/components folder.
- On this file, we will start with the <template> part of our component. It will...