Open viveleroi opened 1 year ago
I've switched a loadable code to lazy so that I can use react suspense, per your website docs.
loadable
lazy
While everything still works, typescript is throwing an error that lazy only accepts one argument.
Error: Expected 1 argument, but got 2
Expected 1 argument, but got 2
const Component = lazy( () => pMinDelay( import(`./modules/${module.folderName}/${submodule.folderName}/${submodule.folderName}.tsx`), 200 ), { resolveComponent: components => components[submodule.componentName] } )
No typescript errors.
npx envinfo --system --binaries --npmPackages @loadable/component,@loadable/server,@loadable/webpack-plugin,@loadable/babel-plugin --markdown --clipboard
Paste the results here:
## System: - OS: Windows 10 10.0.22000 - CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz - Memory: 14.79 GB / 31.73 GB ## Binaries: - Node: 18.9.1 - C:\Program Files\nodejs\node.EXE - Yarn: 3.3.1 - C:\Program Files\nodejs\yarn.CMD - npm: 8.19.1 - C:\Program Files\nodejs\npm.CMD ## npmPackages: - @loadable/component: ^5.15.3 => 5.15.3
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Not stale, needs to be addressed
🐛 Bug Report
I've switched a
loadable
code tolazy
so that I can use react suspense, per your website docs.While everything still works, typescript is throwing an error that
lazy
only accepts one argument.Error:
Expected 1 argument, but got 2
To Reproduce
Expected behavior
No typescript errors.
Run
npx envinfo --system --binaries --npmPackages @loadable/component,@loadable/server,@loadable/webpack-plugin,@loadable/babel-plugin --markdown --clipboard
Paste the results here: