No way to do that in-place, just put it in a variable (with first letter capitalised):
const CustomTag = `h${this.props.level}`;
<CustomTag>Hello</CustomTag>
More Related Contents:
- React: Expected an assignment or function call and instead saw an expression
- You should not use outside a
- Set loading state before and after an action in a React class component
- Cannot use JSX unless the ‘–jsx’ flag is provided
- Visual studio code changes format (React-JSX)
- Warning: Prop `className` did not match. when using styled components with semantic-ui-react
- How do I type this ‘as’ JSX attribute in TypeScript?
- How to define css variables in style attribute in React and TypeScript
- Passing object as props to jsx
- Create-React-App build – “Uncaught SyntaxError: Unexpected token
- Typescript + React/Redux: Property “XXX” does not exist on type ‘IntrinsicAttributes & IntrinsicClassAttributes
- We simply cannot write “ in ReactJS?
- Support for the experimental syntax ‘classProperties’ isn’t currently enabled
- forEach() in React JSX does not output any HTML
- Starter create-react-app with IE11 polyfill import still aborts in IE11
- How to combine multiple inline style objects?
- Passing props into external stylesheet in React Native?
- Redux: Why is avoiding mutations such a fundamental part of using it?
- React Router not working with Github Pages
- TypeError: evt.target is null in functional setState
- Can getDerivedStateFromProps be used as an alternative to componentWillReceiveProps
- React Router 4 Nested Routes not rendering
- React passing parameter via onclick event using ES6 syntax
- React fetch data in server before render
- ReactJS difference between stateful and stateless
- Why useEffect doesn’t run on window.location.pathname changes?
- Call child component method from parent in react
- How to set build .env variables when running create-react-app build script?
- Image elements do not have explicit width and height
- React – “localStorage is not defined” error showing