1import { useCallback, useState } from 'react';
3const kEmptyObject = {};
5export default function useSetState() {
6 const [state, _setState] = useState(kEmptyObject);
7 const setState = useCallback(
8 items => _setState(state => ({ ...state, ...items })),
12 const reset = useCallback(() => _setState(kEmptyObject), [_setState]);
14 return [state, setState, reset];
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list