This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Chris Camargo
Posted Oct 26 - Read on Facebook

How does one avoid this madness?

I'm trying to modify the property of the object in the array, while leaving the original unmodified. What's going wrong here?

2 Comments

JL Flores Mena

Well, you're not duplicating the object here, you're storing it inside an array and then modifying it. First thing is to be aware that what you're doing here is modifying the original (and the only) object.

Keith Lang

From my experience, the ‘reference instead of copy’ issue is pretty common and confusing for the new. I had to ask a friend for help understanding the do (variable, variable) => when iterating in an Event context.

Might Framer detect for behavior where an array is filled with many references to the same object, and offer a soft warning?

Read the entire post on Facebook