From bd363fe0a1abde8806230b996448b50577c1ea8e Mon Sep 17 00:00:00 2001 From: viralgupta Date: Mon, 27 May 2024 14:20:32 +0530 Subject: [PATCH 1/2] reactDom.render -> createRoot.render --- neutralino.config.json | 3 ++- react-src/src/index.js | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/neutralino.config.json b/neutralino.config.json index fa25caf..2541cbe 100644 --- a/neutralino.config.json +++ b/neutralino.config.json @@ -31,7 +31,8 @@ "projectPath": "/react-src/", "initCommand": "npm install", "devCommand": "npm run start", - "buildCommand": "npm run build" + "buildCommand": "npm run build", + "waitTimeout": 30000 } } } diff --git a/react-src/src/index.js b/react-src/src/index.js index 63b3c8d..951cc6d 100644 --- a/react-src/src/index.js +++ b/react-src/src/index.js @@ -1,16 +1,17 @@ import React from 'react'; -import ReactDOM from 'react-dom'; +import { createRoot } from 'react-dom/client'; import './index.css'; import App from './App'; // Import init function from "@neutralinojs/lib" import { init } from "@neutralinojs/lib" -ReactDOM.render( +const container = document.getElementById('root'); +const root = createRoot(container); +root.render( - , - document.getElementById('root') + ); init(); // Add this function call \ No newline at end of file From a7e92b65b24fbc0a28419d31bac0426e59ffe7da Mon Sep 17 00:00:00 2001 From: Mercurial Mercenary <119971154+viralgupta@users.noreply.github.com> Date: Mon, 27 May 2024 18:33:19 +0530 Subject: [PATCH 2/2] Update neutralino.config.json --- neutralino.config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neutralino.config.json b/neutralino.config.json index 2541cbe..d1602a0 100644 --- a/neutralino.config.json +++ b/neutralino.config.json @@ -32,7 +32,7 @@ "initCommand": "npm install", "devCommand": "npm run start", "buildCommand": "npm run build", - "waitTimeout": 30000 + "waitTimeout": 20000 } } }