aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDawson Botsford <dawsonbotsford@gmail.com>2018-02-14 17:59:46 -0800
committerGitHub <noreply@github.com>2018-02-14 17:59:46 -0800
commitad005cc242fff885a4e40fb8b62bf2b2ba8db2e1 (patch)
tree111d5c2a52bc1a742fce99f2571054cd7547ea3b
parent3b8256194f0867685376d7b19329f6e00d0fa0c7 (diff)
downloadbest-practices-ad005cc242fff885a4e40fb8b62bf2b2ba8db2e1.tar.gz
best-practices-ad005cc242fff885a4e40fb8b62bf2b2ba8db2e1.tar.bz2
best-practices-ad005cc242fff885a4e40fb8b62bf2b2ba8db2e1.zip
Update readme.md
-rw-r--r--readme.md4
1 files 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 πŸ’