I have two options in below. What should I choose?
Option 1:
in Header.jsx:
<div>
<Logo />
<Menu>
<MenuItem> homepage </MenuItem>
<MenuItem> contact </MenuItem>
</Menu>
</div>
Option 2:
- in Header.jsx
<div>
<Logo />
<Menu />
</div>
- in Menu.jsx
<ul>
<MenuItem> homepage </MenuItem>
<MenuItem> contact </MenuItem>
<ul>
I don't know the strength or weakness of each option. tks all pro.
MenuItemis part ofMenu, so it should stay encapsuled in theMenucomponent.Headercomponent should not care aboutMenuItem's