Skip to content

Wrong name using StatelessComponent #74

@emartini

Description

@emartini

Hi guys :),

I'm checking this project and I've found this small issue when I declare a StatelessComponent using this notation

import * as React from 'react';


interface IButton {
  /** prop1 */
  prop1: string;
}

const Button: React.SFC<IButton> = props => (
  <button>{props.prop1 || "1"}</button>
);

export default Button;

I see this output,

screen shot 2018-02-19 at 7 11 25 pm

But If I write the component using this notation, I get the right component name

export const Button: React.SFC<IButton> = props => (
  <button>{props.prop1 || "1"}</button>
);

screen shot 2018-02-19 at 7 12 59 pm

Is there a way to indicate the component name when I use the React.SFC<> interface?.

Thanks in advance

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