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