I am trying to use Drizzle inside a React App to show the smart contract details in the front end. However stuck at this error, which says
drizzle-react-components.js:1
Uncaught TypeError: Cannot read properties of undefined (reading 'methods')
at new o
` Further errors in console
` 8index.js:1
The above error occurred in the <o> component:
at o (http://localhost:3000/static/js/vendors~main.chunk.js:466:9)
at div
at div
at http://localhost:3000/static/js/main.chunk.js:198:7
at LoadingContainer (http://localhost:3000/main.0b8989a9c050f470ba10.hot-update.js:35:5)
at v (http://localhost:3000/static/js/vendors~main.chunk.js:2751:19)
at div
at App
The Loading Container is created by me, and this is the content of this script
import React from "react";
import { drizzleReactHooks } from "@drizzle/react-plugin";
const { useDrizzleState } = drizzleReactHooks;
function LoadingContainer({children}) {
const drizzleStatus = useDrizzleState(state => state.drizzleStatus);
if(drizzleStatus.initialized === false) {
return "Loading ...";
}
return (
<>
{children}
</>
)
}
export default LoadingContainer;
Any pointer how to resole this, I am really stuck with this issue.
Thanks
truffle react drizzle