未验证 提交 17384fc0 编写于 作者: D David Janda 提交者: GitHub

Updated with-xstate (#11658)

* Replaced getInitialProps with SSG

* Removed getStaticProps

* Apply suggestions from code review

Remove count
Co-authored-by: NLuis Alvarez D <luis@zeit.co>
上级 cad2a756
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册