keokilee / react-electron-webview

React component for the <webview> element in Electron.
ISC License
27 stars 23 forks source link

Typescript compiler error #13

Open jerrGordon opened 7 years ago

jerrGordon commented 7 years ago

In the index.d.ts file there is a reference to the Electron webview element. tsc 2.4.2 throws this error ERROR in [at-loader] ./node_modules/react-electron-webview/index.d.ts:5:69 TS2694: Namespace 'Electron' has no exported member 'WebViewElement'. I believe the Electron element is called Electron.WebviewTag

yoDon commented 6 years ago

I'm getting runtime errors after monkey patching that issue locally. "TypeError: Cannot read property 'bool' of undefined" in node_modules/react-electron-webview/index.js

flowermm commented 6 years ago

@yoDon This appears to be due to higher versions of React no longer supporting 'React.PropTypes' - PropTypes is now its own package: https://reactjs.org/docs/typechecking-with-proptypes.html.

The notation will need to be updated in webview.js to support React 15.5+.