TipTap useEditor returning null

Viewed 447

I'm using the useEditor function from the TipTap library to create an editor, but it returns null at first. What I mean is, if I used useEditor and immediately logged the variable I set it to, it returns null, but it returns an Editor object afterwards. I'm using React with create-react-app.

I have this in my App.js file:

const editorUse = useEditor({
    extensions: [StarterKit],
    content: JSON.parse(localStorage.getItem("text")) ?? "",
  });
  console.log(editorUse);

It prints out this: error image

Code sandbox: https://codesandbox.io/s/zealous-darwin-iswww?file=/src/App.js

0 Answers
Related