I try to write a React component. for html heading tags(h1,h2,h3,etc...), where the heading priority dynamically changing based on the priority we have defined in the props.
Here what I try to do.
<h{this.props.priority}>Hello</h{this.props.priority}>
expected output:
<h1>Hello</h1>
This is not working. Is there any possible method to do this?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…