Skip to content

Commit 0a7661a

Browse files
committed
🔨 updates hook typedefinitions
1 parent eceacac commit 0a7661a

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/useStableRefTester.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
import { useState, useEffect } from 'react';
22

33
export interface UseStableRefTesterArgs {
4-
timeout: number;
5-
shouldLog: boolean;
4+
timeout?: number;
5+
shouldLog?: boolean;
66
}
77

8-
export const useStableRefTester = ({
9-
timeout = 1000,
10-
shouldLog = false,
11-
}: UseStableRefTesterArgs) => {
12-
if ((process.env.NODE_ENV = 'production')) {
8+
export const useStableRefTester = (
9+
{ timeout, shouldLog }: UseStableRefTesterArgs = { timeout: 1000 },
10+
) => {
11+
if (process.env.NODE_ENV === 'production') {
1312
console.warn(
1413
'useStableRefTester is only intended for development purposes only. Please remove from production bundles.',
1514
);

0 commit comments

Comments
 (0)