microsoft/ReSub

How to define Props

zenchanhk opened this issue · 2 comments

I'm gonna using resub in react-native, but I have no idea to define the properties of a component. Code as follows:

interface Props {
   navigation?;
}
interface State {
   value: string;
}
class TodoList extends ComponentBase<Props, State> {
    ...
    
}

But Typescript always show a red line under Props:
[ts] Type 'Props' has no properties in common with type 'Props<any>'.
Any idea to fix this?

You'll need to have your interface extend React.Props

@berickson1 It works. Thanks a lot for your help.