I am trying to write a React component. for html headers (h1, h2, h3, etc.), where the priority of the header dynamically changes depending on the priority that we have defined in the details.
Here is what I am trying to do.
<h{this.props.priority}>Hello</h{this.props.priority}>
expected output:
<h1>Hello</h1>
This does not work. Is there any possible way to do this?
Eranga Kapukotuwa Nov 02 '15 at 6:26 2015-11-02 06:26
source share