Created
April 1, 2022 20:50
-
-
Save jide/054ebfd639096b7ccfa970acbedab5cd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { useAppState, useActions } from '~/overmind'; | |
export default function Post() { | |
const { post } = useAppState(); | |
const { myAction } = useActions(); | |
return ( | |
<div> | |
<h1>{ post.title }</h1> | |
<button onClick={myAction}>Click me</button> | |
</div> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment