Skip to content

Typescript generic class component props not parsed #550

Open
@oygen87

Description

@oygen87

Consider the example component below which is very common.
I cannot parse the props.
am i doing something incorrect here?
please copy paste in the playgrounds and try it for yourselves. https://reactcommunity.org/react-docgen/

import React, { Component } from 'react';

interface Props {
 /**
  * name of person
  */
  name: string;
}

class MyComponent<T extends Props> extends Component<T> {
  render() {
    <p>hello</p>
  }
}


export default MyComponent;

I expect to get the props parsed for this component from the interface 'Props' But no props are parsed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions