Skip to content

Commit

Permalink
Merge pull request #28920 from software-mansion-labs/ts-migration/use…
Browse files Browse the repository at this point in the history
…ThrottledButtonState

[TS migration] Migrate 'useThrottledButtonState.js' hook to TypeScript
  • Loading branch information
srikarparsi authored Oct 9, 2023
2 parents a348859 + 68afc35 commit 932341f
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import {useEffect, useState} from 'react';

/**
* @returns {Array}
*/
export default function useThrottledButtonState() {
type ThrottledButtonState = [boolean, () => void];

export default function useThrottledButtonState(): ThrottledButtonState {
const [isButtonActive, setIsButtonActive] = useState(true);

useEffect(() => {
Expand Down

0 comments on commit 932341f

Please sign in to comment.