# react
import "./styles.css";
import React, { useReducer } from "react";
function redcuer(state, action){
return { count: state.count + 1 }
}
export default function App() {
const [state, dispatch] = useReducer(redcuer, { count: 0 })
function decrement(){
}
function increment(){
dispatch()
}
return (
<div className="App">
<button onClick={decrement}>-</button>
<span>{state.count}</span>
<button onClick={increment}>+</button>
</div>
);
}