react-boilerplate / react-boilerplate-cra-template

:fire: Setup Create React App with React Boilerplate. Highly scalable & Best DX & Performance Focused & Best practices.
https://react-boilerplate.github.io/react-boilerplate-cra-template/
MIT License
1.87k stars 395 forks source link

Can't pass generic arguments to lazyload (loadable file)? #156

Closed cuongdevjs closed 2 years ago

cuongdevjs commented 2 years ago

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.

Screenshots If applicable, add screenshots to help explain your problem.

Versions

Screen Shot 2022-02-28 at 16 16 14 Screen Shot 2022-02-28 at 16 16 39
cuongdevjs commented 2 years ago

@Can-Sahin please help me.

Can-Sahin commented 2 years ago

If you give a minimal repository without any of your custom code I can take a look. Otherwise, it's not possible to know why. Closing it now but can re-open if you do so.

cuongdevjs commented 2 years ago

Hi. Thank you for your reply. Please take a look at my example: https://codesandbox.io/s/purple-fog-e0b97c?file=/src/App.tsx