Skip to content

Commit cefa093

Browse files
committed
react 18
1 parent e34eb19 commit cefa093

File tree

4 files changed

+617
-8956
lines changed

4 files changed

+617
-8956
lines changed

INFO

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
<div>
22
<p style="display:inline-block;color: red; font-weight: bold;">The new version of npm-gui is out now! Start it with:</p>
33

4-
<pre style="display:inline-block; vertical-align: middle; color: white;">npx npm-gui@latest</pre> <span style="color: white;">Check it out!</span>
4+
<pre style="display:inline-block; vertical-align: middle; color: white;">npx npm-gui@latest</pre>
5+
6+
<span style="color: white;">Check it out!</span>
7+
8+
<a href="https://npm-gui.nullapps.dev" style="colow:white; font-weight: bold;">Go to Documentation</a>
59

6-
<a href="https://npm-gui.nullapps.dev">Go to Documentation</a>
710
</div>

client/index.tsx

+14-9
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { createSyncStoragePersister } from '@tanstack/query-sync-storage-persist
66
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
77
import { persistQueryClient } from '@tanstack/react-query-persist-client';
88
import React from 'react';
9-
import { render } from 'react-dom';
9+
import { createRoot } from 'react-dom/client';
1010

1111
import { App } from './components/App';
1212

@@ -35,14 +35,19 @@ persistQueryClient({
3535
},
3636
});
3737

38-
render(
39-
<React.StrictMode>
40-
<QueryClientProvider client={queryClient}>
41-
<App />
42-
</QueryClientProvider>
43-
</React.StrictMode>,
44-
document.querySelector('.npm-gui'),
45-
);
38+
const container = document.querySelector('.npm-gui');
39+
40+
if (container) {
41+
const root = createRoot(container);
42+
43+
root.render(
44+
<React.StrictMode>
45+
<QueryClientProvider client={queryClient}>
46+
<App />
47+
</QueryClientProvider>
48+
</React.StrictMode>,
49+
);
50+
}
4651

4752
if (window.localStorage.getItem('npm-gui-id') === null) {
4853
window.localStorage.setItem('npm-gui-id', Date.now().toString());

0 commit comments

Comments
 (0)