How to render raw HTML content in React JS?
The return keyword inside the component's function is used to render the result. When a component renders a string value, it is included as text content in the parent element.
Example
import React, { Component } from 'react';
export default function App() {
return <h1 className="bg-secondary text-white text-center p-2">
Hello World
</h1>
}
Most Helpful This Week
onClick Event binding and get event name in ReactJs
Embed JavaScript Expressions in JSX
React JS onClick event handler
Check checkbox is Checked or Unchecked
React JSX
React JS Count number of checkboxes are checked
Check which Radio button is Selected or Clicked
React JS get Tag Name and Inner Text on Click
How to show hide component on Click in React JS?
How to use function inside JSX expression?