Skip to content

Latest commit

 

History

History
15 lines (12 loc) · 337 Bytes

CONVENTIONS.md

File metadata and controls

15 lines (12 loc) · 337 Bytes
  • when creating Props type for a component, always use type Props
  • do not use React.FC for components as type, if needed use {}: Props as argument. Example:
// bad
const MyComponent: React.FC<Props> = () => {
  return <div>Hello</div>;
};

// good
const MyComponent = ({value}: Props) => {
  return <div>Hello</div>;
};