codex-team / codex-team/editor.js
[Bug]Double instance in react
- Dominant language
- TypeScript
- Stars
- 31.9k
- Forks
- 2.2k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
I got a render error regarding dom/client in React. I am using the react-editor-js library. I fix the issue temporarily using the ReactDom render as follows
### Problematic Index.js
`import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
);
`
### After the fix
`import ReactDOM from "react-dom";
import React from "react";
// import { createRoot } from "react-dom/client";
import App from "./App";
const rootElement = document.getElementById("root");
// const root = createRoot(rootElement);
ReactDOM.render(, rootElement);
`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.