Unverified Commit 17384fc0 authored by David Janda's avatar David Janda Committed by GitHub

Updated with-xstate (#11658)

* Replaced getInitialProps with SSG

* Removed getStaticProps

* Apply suggestions from code review

Remove count
Co-authored-by: 's avatarLuis Alvarez D <luis@zeit.co>
parent cad2a756
...@@ -4,10 +4,10 @@ import { Counter, Toggle } from '../components' ...@@ -4,10 +4,10 @@ import { Counter, Toggle } from '../components'
import { toggleMachine } from '../machines/toggleMachine' import { toggleMachine } from '../machines/toggleMachine'
import { counterMachine } from '../machines/counterMachine' import { counterMachine } from '../machines/counterMachine'
const IndexPage = ({ count }) => { const IndexPage = () => {
const [toggleCurrent, toggleSend] = useMachine(toggleMachine) const [toggleCurrent, toggleSend] = useMachine(toggleMachine)
const [counterCurrent, counterSend] = useMachine(counterMachine, { const [counterCurrent, counterSend] = useMachine(counterMachine, {
context: { count }, context: { count: 999 },
}) })
return ( return (
...@@ -29,8 +29,4 @@ const IndexPage = ({ count }) => { ...@@ -29,8 +29,4 @@ const IndexPage = ({ count }) => {
) )
} }
IndexPage.getInitialProps = async () => {
return { count: 999 }
}
export default IndexPage export default IndexPage
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment