I want to use attribute name including colon(:) in JSX.
ex)
<div sa:name='timer'></div>
I know react can't use a colon in the attribute name.
how is it possible to use that attribute name?
please help me :)
I want to use attribute name including colon(:) in JSX.
ex)
<div sa:name='timer'></div>
I know react can't use a colon in the attribute name.
how is it possible to use that attribute name?
please help me :)
you an try this
const props = {}
props ["sa:name"] = "timer";
<div props={props}></div>
now you can access props["sa:name"] in your children component.