diff --git a/content/6-form-input/4-select/qwik/ColorSelect.tsx b/content/6-form-input/4-select/qwik/ColorSelect.tsx index dbc2803d..713cfcb2 100644 --- a/content/6-form-input/4-select/qwik/ColorSelect.tsx +++ b/content/6-form-input/4-select/qwik/ColorSelect.tsx @@ -1,4 +1,4 @@ -import { component$, useStore, $ } from "@builder.io/qwik"; +import { component$, useSignal } from "@builder.io/qwik"; export const colors = [ { id: 1, text: "red" }, @@ -8,16 +8,17 @@ export const colors = [ ]; const ColorSelect = component$(() => { - const store = useStore({ selectedColorId: 2 }); - - const handleChange = $((event: Event) => { - store.selectedColorId = Number((event.target as HTMLInputElement).value); - }); + const selectedColorId = useSignal("2"); return ( - {colors.map((color) => ( - ))}