import React from 'react' import Link from 'next/link' import { useCount, useDispatchCount } from '../components/Counter' const IndexPage = () => { const count = useCount() const dispatch = useDispatchCount() const handleIncrease = event => dispatch({ type: 'INCREASE', }) const handleDecrease = event => dispatch({ type: 'DECREASE', }) return ( <>
Counter: {count}
> ) } export default IndexPage