You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, first of all thanks to the contribution of ctrlplusb.
Problem
Below is my code in a tsx file:
import sizeMe from 'react-sizeme'
// create <MyComponent/>
export default sizeMe()(<MyComponent/>)
Then when I use webpack for build, I get an error like this:
ERROR TS2349: Cannot invoke an expression whose type lacks a call signature. Type \'typeof import("/workproject/node_modules/react-sizeme/react-sizeme")\' has no compatible call signatures.
Environment
node version: 6.10.0
webpack version: 4.19.1
typescript version : 3.1.3
Solution
temporary: replace import sizeMe from 'react-sizeme' with import { withSize } from 'react-sizeme' because withSize have a type definition.
Hello, first of all thanks to the contribution of ctrlplusb.
Problem
Below is my code in a tsx file:
Then when I use webpack for build, I get an error like this:
Environment
Solution
import sizeMe from 'react-sizeme'
withimport { withSize } from 'react-sizeme'
because withSize have a type definition.react-sizeme.d.ts
like thisThe text was updated successfully, but these errors were encountered: