Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

Commit

Permalink
Use React 17 API due to react-scrollbars-custom
Browse files Browse the repository at this point in the history
See #464
  • Loading branch information
nop33 committed Jan 11, 2023
1 parent 2318af5 commit 47f3d53
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import './i18n'
import '@yaireo/tagify/dist/tagify.css' // Tagify CSS: important to import after index.css file

import { StrictMode, Suspense } from 'react'
import { createRoot } from 'react-dom/client'
import ReactDOM from 'react-dom'
import { Provider } from 'react-redux'
import { HashRouter as Router } from 'react-router-dom'
import { ThemeProvider } from 'styled-components'
Expand All @@ -36,10 +36,12 @@ import { store } from './store/store'
import { GlobalStyle } from './style/globalStyles'
import { lightTheme } from './style/themes'

// The app still behaves as if React 17 is used. This is because
// `react-custom-scrollbars` is not working with React 18 yet.
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const root = createRoot(document.getElementById('root')!)
// const root = createRoot(document.getElementById('root')!)

root.render(
ReactDOM.render(
<StrictMode>
<Provider store={store}>
<Router>
Expand All @@ -59,7 +61,8 @@ root.render(
</ThemeProvider>
</Router>
</Provider>
</StrictMode>
</StrictMode>,
document.getElementById('root')
)

//
Expand Down

0 comments on commit 47f3d53

Please sign in to comment.