Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { useReducer } from 'react'
- const initialState = {
- //
- }
- const reducer = (state, action) => {
- switch (action.type) {
- default:
- return state
- }
- }
- const useSomeHook = () => {
- const [state, dispatch] = useReducer(reducer, initialState)
- return {
- ...state,
- }
- }
- export default useSomeHook
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement