I know how to use props in sveltekit but how do you get a variable "height" the other way set in Nested.svelte at the same time?
//App.svelte
<script>
import Nested from './Nested.svelte';
</script>
{height}
<Nested answer={42}/>
//Nested.svelte
<script>
export let answer;
export let height;
</script>
<div bind:clientHeight={height}>The answer is {answer}</div>
>Solution :
You need to declare a local variable use bind on the component:
<script>
import Nested from './Nested.svelte';
let height;
</script>
<Nested bind:height />
Or without shorthand if the variable name is different:
<script>
import Nested from './Nested.svelte';
let nestedHeight;
</script>
<Nested bind:height={nestedHeight} />