reactjs/react-docgen

Flow typed component not renderning

Sonukr opened this issue · 2 comments

// @flow
import React from 'react';

type userAvatarProps = {
  name: string,
  url: string,
  size ?: number,
  textOnly?: boolean,
};

export default function UserAvatar ({ name = '', url = '', size = 25, textOnly = false }): userAvatarProps {
  return (
   .....
  );
}

I have Above component with the flow which is showing error on compile saying -

src/components/Avatar/index.js: Missing semicolon. (8:4)

   6 | import { getAvatarText } from 'utils/utils';
   7 |
>  8 | type userAvatarProps = {
     |     ^
   9 |   name: string,
  10 |   url: string,
  11 |   size ?: number,

It usually means that react-docgen does not understand your source code, try to file an issue here:
https://github.com/reactjs/react-docgen/issues

Also, in server, it's saying that UserAvatar is not defined.

Having same issue. Hope it is fixed soon.

danez commented

cannot reproduce anymore in version 6.0