ideal
I'd like to get input data from child component.
What I have tried
<script>
import Input from "./Input.svelte";
let userGoal = "";
</script>
<h1>Your Goal is {userGoal}</h1>
<Input {userGoal} />
<script>
export let userGoal = "";
$: console.log(userGoal);
</script>
<input type="text" bind:value={userGoal} />
$: console.log(userGoal);
shows userGoal at each event which is as I expected. However, It doesn't affect to parent Component.
Summary
I'm new to Svelte. Any help is appreciated.
bind
. – Haleigh