3. Create a React Component from the BaseStyledComponent
class
2. Inject a marker into the stylesheet
1. Create a counter & unique ID for the component
4. Inject into stylesheet
Use the single responsibility principle
The single responsibility principle is a computer programming principle that states that every module or class should have responsibility over a single part of the functionality provided by the software, and that responsibility should be entirely encapsulated by the class. All its services should be narrowly aligned with that responsibility.
Identify the discrete UI states the component needs to satisfy
Consider Reusability
1. Very specific use case?
2. App specific use cases?
3. Completely generic and reusable? (Can be used in any context)
state = {
todos: []
todoLength: 0
}
Style declarations should be "derived" from UI state
1. Use inline styles
2. Extend the component
(as long as props are passed through)
👎
👍
dropping support for React 15 and below