Skip to content

Commit

Permalink
refactor: Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
finom committed Mar 15, 2024
1 parent 2330660 commit 05d8dbf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type Use<TState> = {
};

export function getUse<TState>() {
const use = function use(this: TState, keys: null | undefined | keyof TState | readonly (null | undefined | keyof TState)[]) {
function use(this: TState, keys: null | undefined | keyof TState | readonly (null | undefined | keyof TState)[]) {
const [updatedTimes, setUpdatedTimes] = useState(0);
const updateKey = (keys instanceof Array ? keys : [keys]).map(String).join();

Expand Down Expand Up @@ -51,7 +51,7 @@ export function getUse<TState>() {
// eslint-disable-next-line react-hooks/exhaustive-deps
[updateKey, updatedTimes],
);
};
}

return use as Use<TState>;
}

0 comments on commit 05d8dbf

Please sign in to comment.