We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eceacac commit 0a7661aCopy full SHA for 0a7661a
src/useStableRefTester.tsx
@@ -1,15 +1,14 @@
1
import { useState, useEffect } from 'react';
2
3
export interface UseStableRefTesterArgs {
4
- timeout: number;
5
- shouldLog: boolean;
+ timeout?: number;
+ shouldLog?: boolean;
6
}
7
8
-export const useStableRefTester = ({
9
- timeout = 1000,
10
- shouldLog = false,
11
-}: UseStableRefTesterArgs) => {
12
- if ((process.env.NODE_ENV = 'production')) {
+export const useStableRefTester = (
+ { timeout, shouldLog }: UseStableRefTesterArgs = { timeout: 1000 },
+) => {
+ if (process.env.NODE_ENV === 'production') {
13
console.warn(
14
'useStableRefTester is only intended for development purposes only. Please remove from production bundles.',
15
);
0 commit comments