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
How to render one component in another component in React JS?
onClick Event binding and get event name in ReactJs
How to use arrow function in React stateless components?
Component displays Height and Width on window resize
Check checkbox is Checked or Unchecked
Example of React Bootstrap Datatable
What is state in React?
React Static Website with Material UI theme
Example of React JS with Material UI components
How to set property values using expression?