According the error there is no layout component, so i shadow the layout component, but this time the hooks api go wrong. useCurrentDoc get undefined、useMenus get null
By now, i find out that to avoid page reload when navigation changes in gatsby2 is adding the gatsby-plugin-layout plugin, is there any other way to solve this problem? If somebody knows, tell me please! Thanks!
Bug Report
Describe the bug
Build fail when use gatsby-plugin-layout plugin
Detail To avoid the whole page reloading when the navigation changes , i add the gatsby plugin to the project, but get some error, like blow
gatsby-config.js
fileThe error i got
According the error there is no layout component, so i shadow the layout component, but this time the hooks api go wrong.
useCurrentDoc
getundefined
、useMenus
getnull
gatsby-config.js
fileThe directory of my project
The Layout component
here is the console reuslt
By now, i find out that to avoid page reload when navigation changes in gatsby2 is adding the gatsby-plugin-layout plugin, is there any other way to solve this problem? If somebody knows, tell me please! Thanks!