class constructor cannot be invoked without 'new react js code example

Example 1: Class constructor cannot be invoked without new

{
        "compilerOptions": {
            "target": "ES6",
            ...
        }
    }

Example 2: TypeError: Class constructor Home cannot be invoked without 'new'

import React, { Component } from 'react'
import { Link } from 'react-router-dom'
class NavBar extends Component{

    render(){
        return(
            <div>
            
            	{/* Watch out to */}
                
                <Link to="/">Home</Link> 
                <Link to="/about">About</Link>
                <Link to="/contact">Contact</Link>
            </div>
        )
    }
}

export default NavBar;