- Class declaration:
export default class ExampleWidget extends Component { ... }
Component
should be included in the import:import React, { Component } from 'react'
- Include static class properties at the top of the class
- displayName:
static displayName = 'ExampleWidget'
- propTypes:
static propTypes = { ... }
- Bonus points for comment descriptions and alphabetization
- defaultProps:
static defaultProps = { ... }
- Include even if empty
- displayName:
- Styling: use
styled-components
to style the components within the same file. Avoid additional CSS files.
This repository has been archived by the owner on Jun 16, 2020. It is now read-only.