From c55b67ea24d4349fcf0eb3da63090be87a47f4be Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Tue, 6 Sep 2022 20:16:58 +0200 Subject: [PATCH] Update tic-tac-toe React initialization --- README.md | 2 +- tic-tac-toe/client/main.jsx | 6 +++--- tic-tac-toe/package-lock.json | 6 +++--- tic-tac-toe/package.json | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 6c94a6c..96963ae 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ - Repository: [meteor/examples/tic-tac-toe](./tic-tac-toe) - Why: To show that we can even build multiplayer games with meteor. - Stack: Meteor and React -- Last Updated At: Aug/25/2022 +- Last Updated At: Sep/06/2022 - Meteor Version: 2.7.3 #### Simple Tasks diff --git a/tic-tac-toe/client/main.jsx b/tic-tac-toe/client/main.jsx index 18acf07..abca3f8 100644 --- a/tic-tac-toe/client/main.jsx +++ b/tic-tac-toe/client/main.jsx @@ -1,9 +1,9 @@ import React from 'react'; import { Meteor } from 'meteor/meteor'; -import { createRoot } from 'react-dom/client'; import { App } from '/imports/ui/App'; +import { render } from 'react-dom' Meteor.startup(() => { - const root = createRoot(document.getElementById('react-target')) - root.render(); + const root = document.getElementById('react-target') + render(, root) }); diff --git a/tic-tac-toe/package-lock.json b/tic-tac-toe/package-lock.json index 699845b..e633917 100644 --- a/tic-tac-toe/package-lock.json +++ b/tic-tac-toe/package-lock.json @@ -4,9 +4,9 @@ "lockfileVersion": 1, "dependencies": { "@babel/runtime": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", - "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.19.0.tgz", + "integrity": "sha512-eR8Lo9hnDS7tqkO7NsV+mKvCmv5boaXFSZ70DnfhcgiEne8hv9oCEd36Klw74EtizEqLsy4YnW8UWwpBVolHZA==", "requires": { "regenerator-runtime": "^0.13.4" } diff --git a/tic-tac-toe/package.json b/tic-tac-toe/package.json index 2214c29..2efc2ef 100644 --- a/tic-tac-toe/package.json +++ b/tic-tac-toe/package.json @@ -8,7 +8,7 @@ "visualize": "meteor --production --extra-packages bundle-visualizer" }, "dependencies": { - "@babel/runtime": "^7.18.9", + "@babel/runtime": "^7.19.0", "meteor-node-stubs": "^1.2.5", "react": "^18.2.0", "react-dom": "^18.2.0",