diff options
-rw-r--r-- | readme.md | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -34,13 +34,13 @@ Make your code π― - A collection of best practices for software * Any types used in more than one file should be placed in `src/types.js` * Add flow linting via [eslint-plugin-flowtype](https://github.com/gajus/eslint-plugin-flowtype) * Disallow `any` with [eslint no-weak-types](https://github.com/gajus/eslint-plugin-flowtype#no-weak-types) +* In components which use `mapStateToProps`, separate `OwnProps` from `ConnectedProps` into separate interfaces. Join them with `type Props = OwnProps & ConnectedProps`. In addition, if using `mapDispatchToProps`, create a type `DispatchProps` and join that with `Props`. ### π£π’ TypeScript π£π’ * Lint with [`tslint:recommended`](https://github.com/palantir/tslint) at a minimum. * No implicit any (type everything thatβs not inferable) -* Any variable declared without an initial value should be typed (`let patientId;`) -* In components which use `mapStateToProps`, separate `ownProps` from `connectedProps` into separate interfaces +* Any variable declared without an initial value should be typed ## π
CSS π
|