import { useState, useMemo } from 'react';

const useUpdate=()=>{
  const [count,setCount] = useState(1);
  const action = useMemo(()=>{
    return [count,()=>{setCount(count+1)}]
  },[count,setCount])
  return action;
}

export default useUpdate;
