Naung Ye Htet
Naung Ye Htet

Reputation: 45

Uncaught TypeError: setImmediate is not a function

I am using a React TextEditor package React Draft Wysiwyg.

Here is the implementation.

export default function TextEditor() {
    const [editorState, setEditorState] = useState(() =>
        EditorState.createEmpty()
    );

    const handleEditorState = editorState => {
        setEditorState(editorState);
    };

    return (
        <Editor
            editorState={editorState}
            toolbarClassName="toolbarClassName"
            wrapperClassName="wrapperClassName"
            editorClassName="editorClassName"
            onEditorStateChange={handleEditorState}
        />
    );
}

vite.config.js

plugins: [
    laravel({
        input: "resources/js/app.jsx",
        ssr: "resources/js/ssr.jsx",
        refresh: true,
    }),
    react(),
],
define: {
    global: {},
},

And it run into an console error Uncaught TypeError: setImmediate is not a function.

Here is the original implementation article from Medium article

Upvotes: 0

Views: 773

Answers (0)

Related Questions