tooot/App.tsx

30 lines
646 B
TypeScript
Raw Normal View History

2020-10-31 21:04:46 +01:00
import React from 'react'
import { QueryCache, ReactQueryCacheProvider, setConsole } from 'react-query'
2020-11-21 13:19:05 +01:00
import { Provider } from 'react-redux'
2020-10-31 21:04:46 +01:00
import { Index } from 'src/Index'
2020-11-21 13:32:29 +01:00
import { store } from 'src/store'
2020-10-31 21:04:46 +01:00
const queryCache = new QueryCache()
setConsole({
log: console.log,
warn: console.warn,
error: console.warn
})
2020-11-17 23:57:23 +01:00
if (__DEV__) {
const whyDidYouRender = require('@welldone-software/why-did-you-render')
// whyDidYouRender(React)
2020-11-17 23:57:23 +01:00
}
const App: React.FC = () => (
<ReactQueryCacheProvider queryCache={queryCache}>
2020-11-21 13:19:05 +01:00
<Provider store={store}>
<Index />
</Provider>
</ReactQueryCacheProvider>
)
2020-10-31 21:04:46 +01:00
export default App