Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
IT Security ToolsHashcatRosetta(02.10.2026 um 19:23 Uhr)
•
IT Security NachrichtenThe legal questions raised by agentic AI hacks(02.10.2026 um 19:47 Uhr)
••
Sicherheitslücken (CVE)FortiMail zero-day exploited in attacks as CISA urges immediate patching(02.10.2026 um 19:28 Uhr)
•
IT Security NachrichtenNew infosec products of the week: October 2, 2026(02.10.2026 um 06:00 Uhr)
•
IT Security NachrichtenAI agents keep access to company data after their work is done(02.10.2026 um 06:30 Uhr)
••
Malware / Trojaner / VirenAndroid 17 makes it harder for spyware to cover its tracks(02.10.2026 um 07:30 Uhr)
•
IT Security NachrichtenCriminal recruiters want people on your payroll(02.10.2026 um 08:00 Uhr)
•
Sicherheitslücken (CVE)Critical FortiMail zero-day exploited in the wild (CVE-2026-104286)(02.10.2026 um 10:50 Uhr)
•
IT Security ToolsHashcatRosetta(02.10.2026 um 19:23 Uhr)
•
IT Security NachrichtenThe legal questions raised by agentic AI hacks(02.10.2026 um 19:47 Uhr)
••
Sicherheitslücken (CVE)FortiMail zero-day exploited in attacks as CISA urges immediate patching(02.10.2026 um 19:28 Uhr)
•
IT Security NachrichtenNew infosec products of the week: October 2, 2026(02.10.2026 um 06:00 Uhr)
•
IT Security NachrichtenAI agents keep access to company data after their work is done(02.10.2026 um 06:30 Uhr)
••
Malware / Trojaner / VirenAndroid 17 makes it harder for spyware to cover its tracks(02.10.2026 um 07:30 Uhr)
•
IT Security NachrichtenCriminal recruiters want people on your payroll(02.10.2026 um 08:00 Uhr)
•
Sicherheitslücken (CVE)Critical FortiMail zero-day exploited in the wild (CVE-2026-104286)(02.10.2026 um 10:50 Uhr)
•
Intelligence View
⚡ tsecurity.de Intelligence

Day 14 - Create a PlanPicker Parent Component

Table of Contents App Component Create the PlanPicker Component Github Repositories On day 14, I continued refactoring the App Component by extracting the…

Beitrag
0
Seite
0
↗ Quelle (dev.to)
Social ReaktionenReagiere als Erste:r — dein Feedback zählt!




Table of Contents




  • App Component

  • Create the PlanPicker Component

  • Github Repositories



On day 14, I continued refactoring the App Component by extracting the coffee plan list to a new PlanPicker component. Not only the App component is cleaner but also the PlanPicker component can be reused to create additional coffee plan lists.






App Component






<script setup lang="ts">
import CoffeePlan from './components/CoffeePlan.vue'
import { ref } from 'vue'

const plans = ref(["The Single", "The Curious", "The Addict", "The Hacker"])
</script>

<template>
<div class="content">
<h1 class="title">Coffee Plans</h1>

<h2 class="subtitle">We travel the world to source the very best single origin coffee for you</h2>

<div class="plans">
<CoffeePlan v-for="plan in plans" :key="plan" :name="plan" />
</div>
</div>
</template>






The above is the existing App component and I will extract




<div class="plans">
<CoffeePlan v-for="plan in plans" :key="plan" :name="plan" />
</div>






to a new PlanPicker component.






Create the PlanPicker Component






Vue 3 application




  • Create a new components/PlanPicker.vue file and update the template.




<script setup lang="ts">
import { ref } from 'vue'
import CoffeePlan from './CoffeePlan.vue'

const plans = ref(["The Single", "The Curious", "The Addict", "The Hacker"])
</script>

<template>
<div class="plans">
<CoffeePlan v-for="plan in plans" :key="plan" :name="plan" />
</div>
</template>







  • Import PlanPicker to App.vue




<script setup lang="ts">
import PlanPicker from './components/PlanPicker.vue'
</script>

<template>
<div class="content">
<h1 class="title">Coffee Plans</h1>

<h2 class="subtitle">We travel the world to source the very best single origin coffee for you</h2>

<PlanPicker />
</div>
</template>









SvelteKit application




  • Create a new lib/plan-picker.svelte file and update the template.




<script lang="ts">
import CoffeePlan from './coffee-plan.svelte'
</script>

<div class="plans">
{#each plans as plan (plan)}
<CoffeePlan name={plan} />
{/each}
</div>







  • export the new component from lib/index.ts




export * from './plan-picker.svelte';







  • Import PlanPicker to +page.svelte




<script lang="ts">
import PlanPicker from '$lib/plan-picker.svelte';
</script>

<template>
<div class="content">
<h1 class="title">Coffee Plans</h1>

<h2 class="subtitle">We travel the world to source the very best single origin coffee for you</h2>

<PlanPicker />
</div>
</template>









Angular 19 application




  • Create a new PlanPickerComponent




ng g c PlanPicker









import { CoffeePlanComponent } from '../coffee-plan/coffee-plan.component';

@Component({
selector: 'app-plan-picker',
imports: [CoffeePlanComponent],
template: `
<div class="plans">
@for (plan of plans(); track plan) {
<app-coffee-plan [name]="plan" />
}
</div>
`
,
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class PlanPickerComponent {
plans = signal(['The Single', 'The Curious', 'The Addict', 'The Hacker']);
}







  • Import PlanPickerComponent to AppComponent in app.component.ts




import { PlanPickerComponent } from './plan-picker/plan-picker.component';

@Component({
selector: 'app-root',
imports: [PlanPickerComponent],
template: `
<div class="content">
<h1 class="title">Coffee Plans</h1>

<h2 class="subtitle">We travel the world to source the very best single origin coffee for you</h2>

<app-plan-picker />
</div>
`
,
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class AppComponent {}






We have successfully created a PlanPicker component that encapsulates the CoffeePlan component. The PlanPicker is the parent of the CoffeePlan and provides the props to the to the children.






Github Repositories:



🔍 CTI & Forensik

Cyber Threat Intelligence & Forensik

ATT&CK-Navigator · IoC-Radar · Exploit-Belege
CTI Threat Relationship Graph
Akteure · Techniken · Beziehungen
2 Knoten · 1 Relationen
CVE / Incident Threat Actor Software MITRE ATT&CK CWE Weakness IoC
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Day 14 - Create a PlanPicker Parent Component

Thematisch verwandte Begriffe: Create, PlanPicker, Parent, Component · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag