Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 384 Bytes

styleguide.md

File metadata and controls

17 lines (13 loc) · 384 Bytes

Styleguide

  • It's better to avoid the 'FunctionComponent'/'FC' and do the following. This avoids one extra burden of being complied to the 'FunctionComponent' type declaration.
import React, {ReactNode} from 'react';

interface Props {
    children: ReactNode;
}

function Component({children}: Props):JSX.Element {
    return (
        <div>{children}</div>
    );
}