diff --git a/examples/with-xstate/pages/index.js b/examples/with-xstate/pages/index.js index 3e32a3b2cbd13..841c7b6802da5 100644 --- a/examples/with-xstate/pages/index.js +++ b/examples/with-xstate/pages/index.js @@ -4,10 +4,10 @@ import { Counter, Toggle } from '../components' import { toggleMachine } from '../machines/toggleMachine' import { counterMachine } from '../machines/counterMachine' -const IndexPage = ({ count }) => { +const IndexPage = () => { const [toggleCurrent, toggleSend] = useMachine(toggleMachine) const [counterCurrent, counterSend] = useMachine(counterMachine, { - context: { count }, + context: { count: 999 }, }) return ( @@ -29,8 +29,4 @@ const IndexPage = ({ count }) => { ) } -IndexPage.getInitialProps = async () => { - return { count: 999 } -} - export default IndexPage