Closed cuongdevjs closed 2 years ago
I've created a functional component with generic typescript and wrapped them on loadable HOC, but when I import it then typescript throws an error: Expected 0 type arguments but got 1.
Steps to reproduce the behavior:
Please take a look at my example: https://codesandbox.io/s/purple-fog-e0b97c?file=/src/App.tsx
Thank you.
You have to cast the loadable function as well otherwise how can it be known.
Something like...
const GalleriesDnd: <T extends I_List>(props: { list: T[] }) => any = lazyLoad(....
Description
I've created a functional component with generic typescript and wrapped them on loadable HOC, but when I import it then typescript throws an error: Expected 0 type arguments but got 1.
Steps to reproduce
Steps to reproduce the behavior:
Please take a look at my example: https://codesandbox.io/s/purple-fog-e0b97c?file=/src/App.tsx
Thank you.