Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
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

Closed

Description

@empz

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'.

Activity

  1. Sohojoe commented on Apr 20, 2017

    @Sohojoe

    it worked for me about 20mins ago

    npm install -g yo generator-aspnetcore-spa

  2. SteveSandersonMS commented on Apr 21, 2017

    @SteveSandersonMS
    Member

    @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.

  3. SteveSandersonMS commented on May 4, 2017

    @SteveSandersonMS
    Member

    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).

  4. DanHarman commented on May 4, 2017

    @DanHarman
    Contributor

    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 free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions