Forward Slash in View Model Property names issue
Naming properties while using a forward slash (something very typical for some figma users) makes them invisible in web editor and inaccessible in code (ex: cannot read a value)
I was having a really hard time with my frontend dev to understand why he couldn’t read some of the values, when we eventually manage to isolate the issues.
Example when naming with “/”
Example when naming without “/”
As a side note, when using dots in property names it becomes possible to see the properties organized in a collapsible structure. So an interesting use case for organization.
I was using T. to specify that it’s a trigger, and dev using different elements to “dynamically” get and create names to be able to change artboard; as we weren’t able to read an artboard property value.
So I’m setting a string with the convetioned names, just setting a number and dev created a function to create the artoboard property name to set.
slice(“ST / “ ) + T.Ride + space + property value “1”
to get “T.Ride 1” to change artboards as needed. 😅