-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Labels
Description
I want to pass attribs in my custom element like this:
<my-custom-element attribute-one="[1,2,3,4]" ></my-custom-element>
and receive that into my preact component as an Array, and not a String. For now, im parsing all my props before rendering:
for(let key in this.props){
try {
this.props[key] = JSON.parse(this.props[key])
} catch (e) {}
}
Do you guys think that is a nice improvement for the project? If you agree, i can make a PR with that, just let me know!