commit | author | age
|
c73ebb
|
1 |
import { createApp } from 'vue' |
CM |
2 |
|
bc995b
|
3 |
import App from "./App.vue"; |
CM |
4 |
import ActiveUser from "./components/ActiveUser.vue"; |
|
5 |
import UserData from "./components/UserData.vue"; |
|
6 |
|
|
7 |
|
|
8 |
const app = createApp(App); |
|
9 |
|
|
10 |
app.component("active-user", ActiveUser); |
|
11 |
app.component("user-data", UserData); |
|
12 |
|
|
13 |
app.mount('#app') |
c73ebb
|
14 |
|
CM |
15 |
// Task 1: |
|
16 |
// Add two components to the app: |
|
17 |
// An ActiveUser component and an UserData component |
|
18 |
// ActiveUser should output a username (h2) and age (h3) |
|
19 |
// UserData should output two input fields => for name and age |
|
20 |
// Optional: Add styling of your choice |
|
21 |
|
|
22 |
// Task 2: Output both components side-by-side in your main App template |
|
23 |
|
|
24 |
// Task 3: Add user data and ensure it contains a name and age |
|
25 |
// User data should be output in ActiveUser |
|
26 |
// It should be updated via the UserData component |