I want to create class in React using JSX. I have a dashboard built on react. I selected a part and through inspect element (Google developer console) I got the react id. Now, I want to create a class using JSX, like class=newclass . I have plan to use it in further CSS. I can insert manually from template. But, I want to do it through JSX, also want to test from console temporarily by running the code fron console. This is present area :-
<label data-reactid=".0.b.1.0.1.1.0.0.0.0.0.0">This is text</label>
and I want to add a class there using JSX,
<label data-reactid=".0.b.1.0.1.1.0.0.0.0.0.0" class="newclass">This is text</label>
reactidis managed by the framework and appears on the resulting DOM nodes. Where are you wanting to define your class? Almost always, this is done as @madox2 describes below.