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.
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'.
The text was updated successfully, but these errors were encountered:
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.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Installed latest
generator-aspnetcore-spa
Created a ReactRedux app
dotnet run
App shows the following error:
The text was updated successfully, but these errors were encountered: