Skip to content

Commit

Permalink
Update stack to React 18 with Redux 9
Browse files Browse the repository at this point in the history
  • Loading branch information
Kovah committed Jan 14, 2024
1 parent b1a5f26 commit b021451
Show file tree
Hide file tree
Showing 3 changed files with 168 additions and 265 deletions.
11 changes: 6 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { createRoot } from 'react-dom/client';
import { Provider } from 'react-redux';
import store from './src/app/store';
import { saveState } from './src/app/localstorage';
Expand All @@ -9,9 +9,10 @@ store.subscribe(() => {
saveState(store.getState());
});

ReactDOM.render(
const container = document.getElementById('root');
const root = createRoot(container); // createRoot(container!) if you use TypeScript
root.render(
<Provider store={store}>
<App/>
</Provider>,
document.querySelector('#root')
<App/>
</Provider>
);
Loading

0 comments on commit b021451

Please sign in to comment.