Skip to content

Commit

Permalink
remove defaultProps causing warning, no longer supported/needed
Browse files Browse the repository at this point in the history
  • Loading branch information
rudin authored and jsamr committed Oct 14, 2024
1 parent 64190b3 commit 58935bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
9 changes: 2 additions & 7 deletions packages/webshell/src/hooks/useWebshell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,6 @@ export interface UseWebshellParams<
webViewRef?: ElementRef<any>;
}

const defaultProps = {
webshellDebug: __DEV__,
webshellStrictMode: false
};

/**
* Inject features into a `WebView`, enabling capabilities such
* as:
Expand Down Expand Up @@ -219,8 +214,8 @@ export default function useWebshell<
const {
webHandleRef,
injectedJavaScript: userInjectedJavaScript,
webshellDebug = defaultProps.webshellDebug,
webshellStrictMode = defaultProps.webshellStrictMode,
webshellDebug = __DEV__,
webshellStrictMode = false,
...props
} = webshellProps;
const reporter = React.useMemo(
Expand Down
6 changes: 0 additions & 6 deletions packages/webshell/src/makeWebshell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ import type {
} from './types';
import useWebshell from './hooks/useWebshell';

const defaultProps = {
webshellDebug: __DEV__,
webshellStrictMode: false
};

/**
* Creates a React component which decorates `WebView` component with additional
* capabilities such as:
Expand Down Expand Up @@ -62,7 +57,6 @@ export default function makeWebshell<
const webViewProps = useWebshell({ features, props, webViewRef });
return React.createElement(WebView, webViewProps);
};
Webshell.defaultProps = defaultProps;
return React.forwardRef<
ElementRef<C>,
WebshellProps<ComponentPropsWithRef<C>, F>
Expand Down

0 comments on commit 58935bc

Please sign in to comment.