` autoclosed the `
` because `
` cannot contain block-level elements)
- `option a
` will result in `option a ` (the `
` is removed)
- `
` will result in `
` (a `
` is auto-inserted)
This code will work when the component is rendered on the client (which is why this is a warning rather than an error), but if you use server rendering it will cause hydration to fail.
## `non_reactive_update`
> [!NOTE] '%name%' is updated, but is not declared with '$state(...)'. Changing its value will not correctly trigger updates
## `options_deprecated_accessors`
> [!NOTE] The 'accessors' option has been deprecated. It will have no effect in runes mode
## `options_deprecated_immutable`
> [!NOTE] The 'immutable' option has been deprecated. It will have no effect in runes mode
## `options_missing_custom_element`
> [!NOTE] The 'customElement' option is used when generating a custom element. Did you forget the 'customElement: true' compile option?
## `options_removed_enable_sourcemap`
> [!NOTE] The 'enableSourcemap' option has been removed. Source maps are always generated now, and tooling can choose to ignore them
## `options_removed_hydratable`
> [!NOTE] The 'hydratable' option has been removed. Svelte components are always hydratable now
## `options_removed_loop_guard_timeout`
> [!NOTE] The 'loopGuardTimeout' option has been removed
## `options_renamed_ssr_dom`
> [!NOTE] 'generate: "dom"' and 'generate: "ssr"' options have been renamed to "client" and "server" respectively
## `perf_avoid_inline_class`
> [!NOTE] Avoid 'new class' — instead, declare the class at the top level scope
## `perf_avoid_nested_class`
> [!NOTE] Avoid declaring classes below the top level scope
## `reactive_declaration_invalid_placement`
> [!NOTE] Reactive declarations only exist at the top level of the instance script
## `reactive_declaration_module_script_dependency`
> [!NOTE] Reassignments of module-level declarations will not cause reactive statements to update
## `reactive_declaration_non_reactive_property`
> [!NOTE] Properties of objects and arrays are not reactive unless in runes mode. Changes to this property will not cause the reactive statement to update
## `script_context_deprecated`
> [!NOTE] 'context="module"' is deprecated, use the 'module' attribute instead
## `script_unknown_attribute`
> [!NOTE] Unrecognized attribute — should be one of 'generics', 'lang' or 'module'. If this exists for a preprocessor, ensure that the preprocessor removes it
## `slot_element_deprecated`
> [!NOTE] Using '\' to render parent content is deprecated. Use '{@render ...}' tags instead
## `state_referenced_locally`
> [!NOTE] State referenced in its own scope will never update. Did you mean to reference it inside a closure?
## `store_rune_conflict`
> [!NOTE] It looks like you're using the '$%name%' rune, but there is a local binding called '%name%'. Referencing a local variable with a '$' prefix will create a store subscription. Please rename '%name%' to avoid the ambiguity
## `svelte_component_deprecated`
> [!NOTE] '\' is deprecated in runes mode — components are dynamic by default
In previous versions of Svelte, the component constructor was fixed when the component was rendered. In other words, if you wanted `` to re-render when `X` changed, you would either have to use `` or put the component inside a `{#key X}...{/key}` block.
In Svelte 5 this is no longer true — if `X` changes, `` re-renders.
In some cases `` syntax can be used as a replacement; a lowercased variable with property access is recognized as a component in Svelte 5.
For complex component resolution logic, an intermediary, capitalized variable may be necessary. E.g. in places where `@const` can be used:
```diff
{#each items as item}
-
+ {@const Component = item.condition ? Y : Z}
+
{/each}
```
A derived value may be used in other contexts:
```diff
-
+
```
## `svelte_element_invalid_this`
> [!NOTE] 'this' should be an '{expression}'. Using a string attribute value will cause an error in future versions of Svelte
## `svelte_self_deprecated`
> [!NOTE] '\' is deprecated — use self-imports (e.g. 'import %name% from './%basename%'') instead
## `unknown_code`
> [!NOTE] '%code%' is not a recognised code
> [!NOTE] '%code%' is not a recognised code (did you mean '%suggestion%'?)