import useStorage from '../hooks/useStrorage';

function CustomHook() {
  let [count, setCount] = useStorage('count');
  let [msg, setMsg] = useStorage('message');
  return (
    <div>
      <p>
        local storage：{count} == {msg}
      </p>
      <p>
        <button
          onClick={() => {
            setCount(count + 10);
            setMsg(`加1--${Date.now()}`);
          }}
        >
          +10
        </button>
      </p>
    </div>
  );
}

export default CustomHook;
