Skip to content

Instantly share code, notes, and snippets.

@jide
Created April 1, 2022 20:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jide/054ebfd639096b7ccfa970acbedab5cd to your computer and use it in GitHub Desktop.
Save jide/054ebfd639096b7ccfa970acbedab5cd to your computer and use it in GitHub Desktop.
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