4a02dc5a17
**Affected examples** with-segment-analytics with-slate with-portals-ssr ( _with-portals-ssr is based on a package not being updated in the last year_) with-videojs with-next-page-transitions with-firebase-cloud-messaging with-dynamic-app-layout with-dynamic-import with-next-transition with-carbon-components with-cerebral with-custom-babel-config Here and there I have removed some redundant imports as well. I believe with this PR, there are only 1 or 2 examples left using class-based components. If by any chance you find any, let me know and I'll refactor them too. If you don't like anything or you want me to change something, please let me know. **If there is anything else you'd like me to help with, I would be honored to assist.**
26 lines
656 B
JavaScript
26 lines
656 B
JavaScript
import { Controller } from 'cerebral'
|
|
import Devtools from 'cerebral/devtools'
|
|
import { Container } from '@cerebral/react'
|
|
import Page from '../components/Page'
|
|
import clock from '../modules/clock'
|
|
|
|
const Other = (props) => {
|
|
const { stateChanges } = props
|
|
|
|
const controller = Controller({
|
|
devtools:
|
|
process.env.NODE_ENV === 'production' || typeof window === 'undefined'
|
|
? null
|
|
: Devtools({ host: 'localhost:8787' }),
|
|
modules: { clock },
|
|
stateChanges: stateChanges,
|
|
})
|
|
|
|
return (
|
|
<Container controller={controller}>
|
|
<Page title="Index Page" linkTo="/other" />
|
|
</Container>
|
|
)
|
|
}
|
|
|
|
export default Other
|