reactn icon indicating copy to clipboard operation
reactn copied to clipboard

Remove Component and PureComponent from interface ReactN

Open quisido opened this issue 6 years ago • 2 comments

In src/index.ts, the ReactN interface should not have Component and PureComponent defined, as these are defined in the namespace in order to maintain their generics.

The existence of this interface property prevents class MyComponent extends React.Component from being used with no generics.

TravisCI fails to build if they are missing in the interface, despite the build succeeding locally.

Investigate potential TypeScript version conflicts (delete all node modules and try local build again?)

quisido avatar Jun 04 '19 17:06 quisido

Hi, If this issue is up for grabs, i can take it up. Please let me know.

Razaik25 avatar Aug 26 '19 15:08 Razaik25

Anything marked [help wanted] is for grabs. I'm not sure the solution to this though! I think the goal is for 3.0 I'll drop the decorator support and not try to export React from the package itself, and TypeScript should automatically work without the magic of index.ts that exists today. Until then, getting the current definitions to work in a backwards compatible way is ideal. :)

quisido avatar Aug 27 '19 04:08 quisido