diff options
author | Dawson Botsford <dawsonbotsford@gmail.com> | 2018-02-14 17:59:46 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-14 17:59:46 -0800 |
commit | ad005cc242fff885a4e40fb8b62bf2b2ba8db2e1 (patch) | |
tree | 111d5c2a52bc1a742fce99f2571054cd7547ea3b | |
parent | 3b8256194f0867685376d7b19329f6e00d0fa0c7 (diff) | |
download | best-practices-ad005cc242fff885a4e40fb8b62bf2b2ba8db2e1.tar.gz best-practices-ad005cc242fff885a4e40fb8b62bf2b2ba8db2e1.tar.bz2 best-practices-ad005cc242fff885a4e40fb8b62bf2b2ba8db2e1.zip |
Update readme.md
-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 π
|