You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
Use variable name instead of _
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user