- Class declaration:
export default class ExampleWidget extends Component { ... }Componentshould 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-componentsto style the components within the same file. Avoid additional CSS files.
This repository was archived by the owner on Jun 16, 2020. It is now read-only.