Skip to content

Commit

Permalink
refactor: simplifying code
Browse files Browse the repository at this point in the history
  • Loading branch information
wellyshen committed Sep 30, 2020
1 parent af8363b commit c9a14bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/useLatest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default <T>(val: T): RefObject<T> => {

useEffect(() => {
ref.current = val;
}, [val]);
});

return ref;
};

0 comments on commit c9a14bd

Please sign in to comment.