-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: function reactFormatter uses ReactDOM.render #280
Comments
I have the same error with React 18. |
@ngduc is this repository abandoned? |
I am also seeing this….any timeline on a fix? App reverts back react 17 because of this :) |
This function serves as a workaround for the "ReactDOM.render is no longer supported in React 18" warning. By using I create a PR for this fix import { createRoot } from 'react-dom/client';
function reactFormatter(JSX) {
return function customFormatter(cell, formatterParams, onRendered) {
onRendered(() => {
const cellElement = cell.getElement();
if (cellElement) {
cellElement.innerHTML = '';
const root = createRoot(cellElement);
root.render(JSX);
}
});
return '<div></div>';
};
} |
any alternative to deal with this? |
abandoned this wrapper and use tabulator-tables directly |
I am using React-tabulator along with Next.js.
When I need to use function reactFormatter, I get an error:
next-dev.js?3515:20 Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot
"next": "13.2.1",
"react": "18.2.0",
"react-tabulator": "0.18.1"
The text was updated successfully, but these errors were encountered: