Skip to content

Commit 58935bc

Browse files
rudinjsamr
authored andcommitted
remove defaultProps causing warning, no longer supported/needed
1 parent 64190b3 commit 58935bc

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

packages/webshell/src/hooks/useWebshell.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,6 @@ export interface UseWebshellParams<
148148
webViewRef?: ElementRef<any>;
149149
}
150150

151-
const defaultProps = {
152-
webshellDebug: __DEV__,
153-
webshellStrictMode: false
154-
};
155-
156151
/**
157152
* Inject features into a `WebView`, enabling capabilities such
158153
* as:
@@ -219,8 +214,8 @@ export default function useWebshell<
219214
const {
220215
webHandleRef,
221216
injectedJavaScript: userInjectedJavaScript,
222-
webshellDebug = defaultProps.webshellDebug,
223-
webshellStrictMode = defaultProps.webshellStrictMode,
217+
webshellDebug = __DEV__,
218+
webshellStrictMode = false,
224219
...props
225220
} = webshellProps;
226221
const reporter = React.useMemo(

packages/webshell/src/makeWebshell.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ import type {
88
} from './types';
99
import useWebshell from './hooks/useWebshell';
1010

11-
const defaultProps = {
12-
webshellDebug: __DEV__,
13-
webshellStrictMode: false
14-
};
15-
1611
/**
1712
* Creates a React component which decorates `WebView` component with additional
1813
* capabilities such as:
@@ -62,7 +57,6 @@ export default function makeWebshell<
6257
const webViewProps = useWebshell({ features, props, webViewRef });
6358
return React.createElement(WebView, webViewProps);
6459
};
65-
Webshell.defaultProps = defaultProps;
6660
return React.forwardRef<
6761
ElementRef<C>,
6862
WebshellProps<ComponentPropsWithRef<C>, F>

0 commit comments

Comments
 (0)