How to use arrow function in React stateless components?
Stateless components can be defined using the fat arrow syntax, which exclude the use of return keyword.
Example
import React, { Component } from 'react';
export default () =>
<h1 className="bg-secondary text-white text-center p-2">
Hello World
</h1>
Most Helpful This Week
React JSX
Integrate Bootstrap with ReactJS Application
React Props
How to render raw HTML content in React JS?
Using this keyword access component properties and methods
Check checkbox is Checked or Unchecked
Create React App
onClick Event binding and get event name in ReactJs
How to create simple React Router to navigate multiple pages?
Display JSON Data in React JS