Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { useReducer } from 'react';
- function productsReducer(state: any, action: any) {
- return state;
- }
- export function CMSProductsPage() {
- const [state, dispatch] = useReducer(productsReducer, { pending: false });
- console.log(state)
- return (
- <div>
- <h1 className="title">CMS</h1>
- <hr className="my-8"/>
- { state.pending && <div>Loading</div>}
- <pre>{JSON.stringify(state, null, 2)}</pre>
- </div>
- )
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement