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
{{ message }}
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
Latest ReactRedux template from generator doesn't work #878
Installed latest generator-aspnetcore-spa
Created a ReactRedux app dotnet run
App shows the following error:
ERROR in [at-loader] ./ClientApp/components/Layout.tsx:13:21
TS2322: Type '{}' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<NavMenu> & { children?: ReactNode; } & void'.
Type '{}' is not assignable to type 'void'.
Finally I was able to repro this issue, and have applied a fix in dev. It's still not clear to me why it wasn't reproing before, and why the error still doesn't show up in VS Code (presumably it's a change in the TypeScript compiler, but I don't know exactly what).
I think this was due to an enhancement with typescript 2.3.1 and due to incorrect use of void generic args to react components, when it should have been {} (empty objects) as react always has an empty state/props object when none is defined, so defining as void is incorrect.
Activity
Sohojoe commentedon Apr 20, 2017
it worked for me about 20mins ago
npm install -g yo generator-aspnetcore-spaSteveSandersonMS commentedon Apr 21, 2017
@Sohojoe - thanks for confirming.
I just checked and it worked fine for me too. @emzero, I guess you were seeing an issue in 3rd-party code that's since been fixed.
Closing as resolved.
Fix ReactReduxSpa build issue. Fixes #859 and #878
SteveSandersonMS commentedon May 4, 2017
Finally I was able to repro this issue, and have applied a fix in
dev. It's still not clear to me why it wasn't reproing before, and why the error still doesn't show up in VS Code (presumably it's a change in the TypeScript compiler, but I don't know exactly what).DanHarman commentedon May 4, 2017
I think this was due to an enhancement with typescript 2.3.1 and due to incorrect use of void generic args to react components, when it should have been {} (empty objects) as react always has an empty state/props object when none is defined, so defining as void is incorrect.