Skip to content

Commit

Permalink
switch to createRoot
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrudd2 committed Nov 3, 2023
1 parent 5a17bab commit 73509b8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { render } from 'react-dom';
import { createRoot } from 'react-dom/client';
import { ipcRenderer } from 'electron';

import { Provider } from 'react-redux';
Expand All @@ -26,9 +26,10 @@ const logger = createLogger({
const middleware = applyMiddleware(logger, sendToMainProcessMiddleware, thunk);
const store = createStore(rootReducer, middleware);

render(
const container = document.getElementById('root');
const root = createRoot(container);
root.render(
<Provider store={store}>
<AppContainer />
</Provider>,
document.getElementById('root')
</Provider>
);

0 comments on commit 73509b8

Please sign in to comment.