Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. import { useReducer } from 'react'
  2.  
  3. const initialState = {
  4. //
  5. }
  6.  
  7. const reducer = (state, action) => {
  8. switch (action.type) {
  9. default:
  10. return state
  11. }
  12. }
  13.  
  14. const useSomeHook = () => {
  15. const [state, dispatch] = useReducer(reducer, initialState)
  16. return {
  17. ...state,
  18. }
  19. }
  20.  
  21. export default useSomeHook
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement