Use variable name instead of _

This commit is contained in:
Jorik Schellekens 2020-07-20 20:51:07 +01:00
parent 3cf8dff70d
commit 6433e163f7
2 changed files with 2 additions and 2 deletions

View file

@ -22,7 +22,7 @@ import {Dispatcher} from "flux";
// Hook to simplify listening to flux dispatches
export const useDispatcher = (dispatcher: Dispatcher<ActionPayload>, handler: (payload: ActionPayload) => void) => {
// Create a ref that stores handler
const savedHandler = useRef((_: ActionPayload) => {});
const savedHandler = useRef((payload: ActionPayload) => {});
// Update ref.current value if handler changes.
useEffect(() => {