Skip to content

How is my value "non-reactive"? #13552

Answered by geodask
rempas asked this question in Q&A
Mar 6, 2025 · 1 comments · 5 replies
Discussion options

You must be logged in to vote

Hello! I've taken a look at your color picker app code and can explain why you're getting the "binding_property_non_reactive" error.

Why This Happens

Your current approach has two main issues:

  • You can't export values inside the default <script> tag from .svelte files. If you need to export a value, you should do it from the <script module> tag. More info here: https://svelte.dev/docs/svelte/svelte-files#script-module
  • You're trying to share state across components incorrectly.

Here is how I would approach this if have understood correctly what you want to achieve:

1. Update Your Slider.svelte

<script lang="ts">
  // Accept a direct sliderValue instead of accessing the sliders object.
  //

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@rempas
Comment options

@geodask
Comment options

@rempas
Comment options

@geodask
Comment options

@rempas
Comment options

Answer selected by rempas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants