I am very much new to React. The following is my first script.
But I am getting the following error.
Failed to compile
./src/components/Layout/index.js
Syntax error: Unexpected token (12:5)
10 | const Layout = (props) => {
11 | return(
> 12 | <>
| ^
13 |
14 | <Header />
15 | {props.children}
here is my Layout component code :
import React from 'react';
import Header from '../Header';
/**
* @author
* @function Layout
**/
const Layout = (props) => {
return(
<>
<Header />
{props.children}
</>
)
}
export default Layout;
Any idea how to fix it?
return? Or deleting the newline after the opening parenthesis?