Open mirandashort opened 1 month ago
Hey @mirandashort, thanks for opening this issue!
Sadly this is how the JSON.parse()
function (which Stimulus uses under the hood) and how HTML escaping of attributes works.
But I agree, this is not ideal. Would you mind opening a pull request with your proposed changes so we can improve it for everyone? Thank you!
It took me days to figure out why I wasn't able to get my static value to pass in as an array.
I have a function in
toggle_controller.js
When written as the docs suggest for a string, I get the following:
After so many tries, I switched the order of quotes to the following:
When following the docs, I naturally went with double quotes first. I think it would be helpful to either clarify the importance of the syntax, or in general an example for each valid type (preferred).