meteor3: React 16 -> 18.3 with createRoot

react/react-dom ^18.3.1 (--legacy-peer-deps for the pinned ancient react-*
libs, which still work on 18 via legacy context but gate React 19). Client
entry uses createRoot. Browser-verified on / and /fires; REST smoke
byte-identical (12/12).
This commit is contained in:
vjrj 2026-07-14 11:32:37 +02:00
parent eb3aec82ae
commit 1892c0ead0
4 changed files with 68 additions and 338 deletions

View file

@ -1,6 +1,6 @@
/* global */
import React from 'react';
import { render } from 'react-dom';
import { createRoot } from 'react-dom/client';
import { Meteor } from 'meteor/meteor';
import '/imports/startup/client/modernizr';
import App from '../../ui/layouts/App/App';
@ -15,5 +15,5 @@ else {
Modernizr.on('webp', (result) => {
if (Meteor.isDevelopment) console.log(`webp ${result ? '' : 'not '}supported`);
});
Meteor.startup(() => render(<App />, document.getElementById('react-root')));
Meteor.startup(() => createRoot(document.getElementById('react-root')).render(<App />));
}