react-component / menu

React Menu
https://menu.react-component.now.sh/
MIT License
682 stars 245 forks source link

Google doesn't see it and not indexing. #189

Open romanown opened 6 years ago

romanown commented 6 years ago

Google doesn't see it. after I start using this component, almost all pages are removed from the Google cache. I have "react": "^16.2.0", "react-dom": "^16.2.0", "react-router": "^4.2.0", "react-router-dom": "^4.2.2",

Jaikant commented 6 years ago

Are you sure? I was planning to use antd, which seems to refer to this component.

romanown commented 6 years ago

If i see the page source - no items of menu. have only submenu. You can see it. <li class="rc-menu-submenu rc-menu-submenu-horizontal" role="menuitem"><div class="rc-menu-submenu-title" aria-expanded="false" aria-haspopup="true">COLOR<i class="rc-menu-submenu-arrow"></i></div></li>

yesmeck commented 6 years ago

Please see https://github.com/ant-design/ant-design/issues/5586

romanown commented 6 years ago

forceSubMenuRender = {true} or forceSubMenuRender = 'true' do not helped me

yesmeck commented 6 years ago

With getPopupContainer https://codesandbox.io/s/748w1073pj

romanown commented 6 years ago

Thanks. for a horizontal menu, this works. but the vertical menu for mobile that is hidden and shown only when you click on the button has no items. but if you do the same for html and CSS are displayed items.

romanown commented 6 years ago

in the code inspector there is default

and in the source code of the data page is still not. <li class="rc-menu-submenu rc-menu-submenu-horizontal" role="menuitem"><div class="rc-menu-submenu-title" aria-expanded="false" aria-haspopup="true">All<i class="rc-menu-submenu-arrow"></i></div></li></ul></div></div></div> code `render() { return (

500 ? 'horizontal' : 'vertical'} triggerSubMenuAction={document.body.clientWidth > 500 ? 'hover' : 'click'} */ forceSubMenuRender getPopupContainer={(parent) => parent} style={{backgroundColor: '#2e8982cc', textAlign: 'center', color: '#dedede', paddingLeft: '3px', paddingTop: '0px', width: '100vw', maxWidth: '360px'}} mode= 'horizontal' inlineIndent ='0' > ....` I have the server side rendering. may by it is not works?
romanown commented 6 years ago

perhaps this situation occurs because the menu module is displayed in ModalPortal?