Skip to content
ExplainNov 29, 2026· 0:16· 13 views

Svelte 5.59.2: bind:group now works in nested components

0:16 total

Comments · 0

Be the first to comment.

Explanationby SceneRecap AI

This is a silent 16 second recording of a Svelte Playground titled 'Shared state - bind:group does not work within components?'. At 0.0s App.svelte is open in the editor and the Result pane shows 'loading Svelte compiler...'. At 0.5s the console logged an error: 'Error while migrating Svelte code CompileError: Expected token }'. By 3.0s the demo has rendered. It has a section for binding a $state array, labelled as not working with imports, and a section for binding a $state object prop, labelled as working with imports. Their debug outputs read {"selectedTagsArray":[]} and {"selectedTagsObject":{"selectedValues":[]}}.

At 4.5s the user scrolls the Result pane down. By 5.0s the section '... but not with nested components? :(' is visible. Its text says that changing the state inside the imported Checkboxes component does not update the global state, and that only changes made in App.svelte are passed down. A 'Checkboxes.svelte Red / Yellow' row is shown with both boxes unchecked.

At 9.2s the user clicks the 'Red' checkbox in that nested row. At 11.0s Red is checked, and the partly visible output below it shows a stateVariableToBind value containing "Red". At 12.3s the user clicks the 'Yellow' checkbox. At 13.0s both boxes are checked and the output shows "Red","Yellow". The recording ends at 16s.

The page text still describes nested components as broken. In the recording, though, the nested component's bound value updates on each click (11.0s, 13.0s). The user's title says this is Svelte 5.59.2. No version number appears anywhere in the recording, so that detail cannot be confirmed from it. The recording also does not show whether the change reached any state outside the component, because no other output is in view after the clicks.

Key moments

Playground opens, compiler loading
Console error: Error while migrating Svelte code, Expected token }
Demo renders with array and object binding sections
User scrolls Result pane down
Nested components section visible, both boxes unchecked
Clicks 'Red' checkbox in Checkboxes.svelte
Output shows "Red"
Clicks 'Yellow' checkbox
Output shows "Red","Yellow"

What to know

  • •The demo text at 5.0s claims nested components do not update state. The recording shows the nested component's bound output updating at 11.0s and 13.0s.
  • •The Svelte version in the user's title (5.59.2) is not visible anywhere in the recording.
  • •Only the output directly below the nested component is visible after the clicks. It is partly cut off at the bottom of the pane. No global or parent state output is shown changing.
  • •A console error about migrating Svelte code ('Expected token }') appeared at 0.5s. The demo still rendered by 3.0s.
  • •The array and object sections at the top were not interacted with. Their outputs stayed empty in every frame shown.

Glossary

bind:group
A Svelte directive that links a set of checkbox or radio inputs to one variable, such as an array of selected values.
$state
A Svelte 5 rune that declares reactive state.
Svelte Playground
An online editor on svelte.dev that compiles Svelte code and shows the live result next to the source.
Checkboxes.svelte
A child component in this playground that renders the Red and Yellow checkboxes and receives the state as a prop.

This explanation was written by SceneRecap from a screen recording. Try SceneRecap free

Your recordings could explain themselves too.

Record your screen once and SceneRecap explains what happened, with a timestamp on every point. On every plan, Free included.

Try SceneRecap free →