I'm trying to include Menu from semantic ui react in my website, but I'm getting an error

27 Views Asked by At

I'm trying to learn react while building a project. Idk how to include menu in the website. I have tried two approaches to do this, both are not working.

Approach 1 : enter image description here

Error associated with this approach: enter image description here

Approach 2: enter image description here

Error associated with this approach: enter image description here

I'm trying to create a menu like this: enter image description here

1

There are 1 best solutions below

2
Mitesh Dudhat On

In first, component name and library module name are same. In second, you can not defined component name.

you can add like:

import { Menu } from 'semantic-ui-react';

const MenuBar = () =>{
  return(
    //code
  );
}

export default MenuBar;