Skip to content

Commit

Permalink
Remove unnecessary useCallback
Browse files Browse the repository at this point in the history
  • Loading branch information
M-Izadmehr committed Feb 19, 2020
1 parent 0bd6e07 commit 20caae7
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,16 @@ function CommitRankedListItem({data, index, style}: Props) {
const handleClick = useCallback(
event => {
event.stopPropagation();
selectFiber(node.id, node.name);
const {id, name} = node;
selectFiber(id, name);
},
[node, selectFiber],
);

const handleMouseEnter = useCallback(() => {
const handleMouseEnter = () => {
const {id, name} = node;
hoverFiber({id, name});
}, [node]);
};

const handleMouseLeave = () => {
hoverFiber(null);
Expand Down

0 comments on commit 20caae7

Please sign in to comment.