Last active
February 16, 2019 08:58
-
-
Save nightspirit/da266266052736eb8aef71835ec13159 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 { useContext } from 'react' | |
import { AppReducerContext } from 'app' | |
export default function Foo () { | |
const [state, dispatch] = useContext(AppReducerContext) | |
// can read state or dispatch action to appReducer | |
return ( | |
... | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment