Skip to main content
Question

Possible to override variable value within component instance?


Lucas

Is there anyway to override a variable value set in a component the way you can override other component properties?

I am trying to make a prototype which illustrates a “like” button with a count update on click. Here is how I have set up my components and variables:

The issue of course is that all of them change at once in the prototype like this:

What I would like to do is to override the starting counter value on each instance of the like button so that:

  1. clicking one does not update others
  2. they can have different starting values

However when I override the value (thereby detaching from the variable) the heart gets filled, but the number does not change.

I would like to do something like:

  • In comment instance two, counter=3
  • In comment instance three, counter=0

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings