From ad005cc242fff885a4e40fb8b62bf2b2ba8db2e1 Mon Sep 17 00:00:00 2001 From: Dawson Botsford Date: Wed, 14 Feb 2018 17:59:46 -0800 Subject: Update readme.md --- readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index ba132c2..8dcf66d 100644 --- a/readme.md +++ b/readme.md @@ -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 πŸ’… -- cgit v1.2.3