Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
jridgewell committed Jan 7, 2020
1 parent 3b6b3cc commit f3257a5
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions src/preact/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,3 @@ export function useResourcesNotify() {
}
});
}

/**
* @param {number} current
* @return {number}
*/
function increment(current) {
return current + 1;
}

/**
* @return {function()}
*/
export function useRerenderer() {
const state = useState(0);
// We only care about the setter, which is the second item of the tuple.
const set = state[1];
// useRef ensures the callback's instance identity is consistent.
const ref = useRef(() => set(increment));
return ref.current;
}

0 comments on commit f3257a5

Please sign in to comment.