'',' at </l1> error in visual studio code.This is the code
import React, { Component } from 'react';
import { MenuItems } from './MenuItems';
class Navbar extends Component {
render() {
return (
<nav class-name="NavbarItems">
<h1 class-name="navbar-logo">React<i className="fab fa-react"></i></h1>
<div class-name="menu-icon">
</div>
<ul>
{MenuItems.map((item, index) => {
return( <li key={index}>
<a class-name={item.cName} href={item.url}>
{item.title}
</a>
</li>)}}
</ul>
</nav>
)
}
}
export default Navbar
Solution 1:[1]
I think you have syntax issue near map function.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Eitzaz shah |
