Closed nonewcode closed 7 years ago
Hey Josh,
Thanks for taking the time to raise the issue.
Currently by design the framework will only parse valid JSON in prop attributes. If you want to use native javascript object syntax you may be better off using the data-r-prop.
The reason for this is most backend languages/systems are happy to convert data to JSON to populate the attributes.
In terms of resolving this issue.
I'm more than happy to investigate supporting native syntax if you can help me come up with a use case for it. I'm initially reluctant though as we would have to use eval which is usually viewed as an anti-pattern and raises security issues.
Did you find the docs confusing setting properties? Perhaps we can make changes to the docs so its more clear of whats expected?
Thanks Jenna
When i pass down [{}]. It works
When i pass down [{ id: 1 }]. It does not work.
What i've found is that you can pass down [{"1":1}] and that does work.
Is this intended?