From 0e9f822536af6cb5d32e5e8ed6db7e04a400577e Mon Sep 17 00:00:00 2001 From: Egor Savkin Date: Fri, 14 Jul 2023 15:21:46 +0800 Subject: [PATCH] Fix React warnings in development Signed-off-by: Egor Savkin --- static/js/shop.jsx | 44 +++++++++++++++++------------------------- static/js/shop_data.js | 2 +- 2 files changed, 19 insertions(+), 27 deletions(-) diff --git a/static/js/shop.jsx b/static/js/shop.jsx index bf7f32a..dcdddb1 100644 --- a/static/js/shop.jsx +++ b/static/js/shop.jsx @@ -2,7 +2,7 @@ import React from "react"; import axios from "axios"; -import ReactDOM from "react-dom"; +import { createRoot } from "react-dom/client"; import PropTypes from "prop-types"; import { DragDropContext, Droppable, Draggable } from "react-beautiful-dnd"; import { v4 as uuidv4 } from 'uuid'; @@ -314,10 +314,10 @@ class Layout extends React.PureComponent { ) : null} -