You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am getting this error after I npm install and import MonacoEditor into my react functional component.
This is some of my code:
I have version 3.5.8 installed.
`import React, { useState, useContext } from "react";
import MonacoEditor from "@uiw/react-monacoeditor";
<MonacoEditor
value={code}
language={language}
onBlur={handleCodeChange}
onChange={handleCodeType}
options={{
theme: "vs-dark",
}}
/>
`
No matter what options I pass in, as long as MonacoEditor is there, I get this error:
Please see my monaco branch, you should now be able to run my project without having any firebase credentials. The issue lies in the Library.js file where I am adding in a MonacoEditor component.
I am getting this error after I npm install and import MonacoEditor into my react functional component.
This is some of my code:
I have version 3.5.8 installed.
`import React, { useState, useContext } from "react";
import MonacoEditor from "@uiw/react-monacoeditor";
<MonacoEditor
value={code}
language={language}
onBlur={handleCodeChange}
onChange={handleCodeType}
options={{
theme: "vs-dark",
}}
/>
`
No matter what options I pass in, as long as MonacoEditor is there, I get this error:
Cannot read properties of null (reading 'useState')
TypeError: Cannot read properties of null (reading 'useState')
at useState (http://localhost:3000/static/js/bundle.js:257147:25)
at MonacoEditor (http://localhost:3000/static/js/bundle.js:64921:70)
at renderWithHooks (http://localhost:3000/static/js/bundle.js:30704:22)
at updateForwardRef (http://localhost:3000/static/js/bundle.js:33275:24)
at beginWork (http://localhost:3000/static/js/bundle.js:35322:20)
at HTMLUnknownElement.callCallback (http://localhost:3000/static/js/bundle.js:20296:18)
at Object.invokeGuardedCallbackDev (http://localhost:3000/static/js/bundle.js:20340:20)
at invokeGuardedCallback (http://localhost:3000/static/js/bundle.js:20397:35)
at beginWork$1 (http://localhost:3000/static/js/bundle.js:40271:11)
at performUnitOfWork (http://localhost:3000/static/js/bundle.js:39518:16)
The text was updated successfully, but these errors were encountered: