Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import React from 'react'
import { hydrate } from 'react-dom'
import { BrowserRouter as Router } from 'react-router-dom'
import { ensureReady, After } from '@jaredpalmer/after'
import './client.css'
import routes from './routes'
ensureReady(routes).then(data => {
console.log(data)
hydrate(
,
document.getElementById('root')
)
})
if (module.hot) {
module.hot.accept()
}
import Loading from './Components/Styling/Loading'
import { asyncComponent } from '@jaredpalmer/after'
export default [
{
path: '/',
exact: true,
component: asyncComponent({
loader: () => import('./Pages/Home'),
Placeholder: () =>
})
},
{
path: '/speakers',
exact: true,
component: asyncComponent({
loader: () => import('./Pages/Speakers'),
Placeholder: () =>
})
},
{
path: '/speaker/:speaker',
exact: true,
component: asyncComponent({
loader: () => import('./Pages/Speaker'),
Placeholder: () =>
})
},
{
path: '/category/:category',
exact: true,
component: asyncComponent({
import './index.css';
import React from 'react';
import asyncComponent from '@jaredpalmer/after/asyncComponent';
import Home from './Home';
export default [
{
path: '/',
exact: true,
component: Home,
},
{
path: '/about',
exact: true,
component: asyncComponent({
loader: () => import('./About'),
Placeholder: () => <div>LOADING...</div>,
}),
},
{
path: '/redirect_test',
redirectTo: '/',
pathMatch: 'full',
},
{
path: '**',
component: () => 'Not Found!',
},
];