Skip to content

Commit 6f7a0a8

Browse files
authored
Merge pull request piotrwitek#34 from pino/master
Fixing linebreak and grammar problems
2 parents cc5210a + fe4e2ec commit 6f7a0a8

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

Diff for: README.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# React & Redux in TypeScript - Static Typing Guide
2-
**_"This guide is about to teach you how to leverage [Type Inference](https://www.typescriptlang.org/docs/handbook/type-inference.html), [Generics](https://www.typescriptlang.org/docs/handbook/generics.html) and other [Advanced Types](https://www.typescriptlang.org/docs/handbook/advanced-types.html) as much as possible to write the minimal amount of type annotations needed for your JavaScript code to be completely Type Safe"_** - this will make sure you get all the benefits of Static Typing and won't slow down your productivity by adding unnecessary typings.
2+
**_"This guide is about to teach you how to leverage [Type Inference](https://www.typescriptlang.org/docs/handbook/type-inference.html), [Generics](https://www.typescriptlang.org/docs/handbook/generics.html) and other [Advanced Types](https://www.typescriptlang.org/docs/handbook/advanced-types.html) as much as possible to write the minimal amount of type annotations needed for your JavaScript code to be completely Type Safe"_** - this will make sure you get all the benefits of Static Typing and your productivity won't be slowed down by adding excess type annotations.
33

44
> #### _Found it usefull? Want more updates?_ [**Give it a :star2:**](https://github.com/piotrwitek/react-redux-typescript-patterns/stargazers)
55
@@ -10,7 +10,7 @@
1010

1111
### Playground Project
1212
You should check Playground Project located in the `/playground` folder. It is a source of all the code examples found in the guide. They are all tested with the most recent version of TypeScript and 3rd party type definitions (like `@types/react` or `@types/react-redux`) to ensure the examples are up-to-date and not broken with updated definitions.
13-
> Playground was created is such ą way, that you can easily clone repository locally and immediately play around on your own to learn all the examples from this guide in a real project environment without complicated setup.
13+
> Playground was created is such a way, that you can simply clone the repository locally and immediately play around on your own to learn all the examples from this guide in a real project environment without the need to create some complicated environment setup by yourself.
1414
1515
---
1616

@@ -630,6 +630,7 @@ This pattern is focused on a KISS principle - to stay clear of complex proprieta
630630
Advantages:
631631
- simple "const" based types
632632
- familiar to standard JS usage
633+
633634
Disadvantages:
634635
- significant amount of boilerplate and duplication
635636
- necessary to export both action types and action creators to re-use in other places, e.g. `redux-saga` or `redux-observable`
@@ -882,8 +883,8 @@ export type RootAction =
882883
883884
### Create Store
884885
885-
When creating store use rootReducer instance, this alone will to set-up **strongly typed Store instance** with type inference.
886-
> The resulting store instance methods like `getState` or `dispatch` will be typed checked and expose type errors
886+
When creating the store, use rootReducer. This will set-up a **strongly typed Store instance** with type inference.
887+
> The resulting store instance methods like `getState` or `dispatch` will be type checked and expose type errors
887888
888889
```tsx
889890
import { createStore, applyMiddleware, compose } from 'redux';
@@ -1232,7 +1233,7 @@ declare module 'enzyme';
12321233
# FAQ
12331234
12341235
### - should I still use React.PropTypes in TS?
1235-
> No. When using TypeScript it is an unnecessary overhead, when declaring IProps and IState interfaces, you will get complete intellisense and compile-time safety with static type checking, this way you'll be safe from runtime errors and you will save a lot of time on debugging. Additional benefit is an elegant and standarized method of documenting your component external API in the source code.
1236+
> No. With TypeScript, using PropTypes is an unnecessary overhead. When declaring IProps and IState interfaces, you will get complete intellisense and compile-time safety with static type checking. This way you'll be safe from runtime errors and you will save a lot of time on debugging. Additional benefit is an elegant and standardized method of documenting your component external API in the source code.
12361237
12371238
[⇧ back to top](#table-of-contents)
12381239

Diff for: docs/markdown/2_redux.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ This pattern is focused on a KISS principle - to stay clear of complex proprieta
88
Advantages:
99
- simple "const" based types
1010
- familiar to standard JS usage
11+
1112
Disadvantages:
1213
- significant amount of boilerplate and duplication
1314
- necessary to export both action types and action creators to re-use in other places, e.g. `redux-saga` or `redux-observable`
@@ -160,8 +161,8 @@ Can be imported in various layers receiving or sending redux actions like: reduc
160161

161162
### Create Store
162163

163-
When creating store use rootReducer instance, this alone will to set-up **strongly typed Store instance** with type inference.
164-
> The resulting store instance methods like `getState` or `dispatch` will be typed checked and expose type errors
164+
When creating the store, use rootReducer. This will set-up a **strongly typed Store instance** with type inference.
165+
> The resulting store instance methods like `getState` or `dispatch` will be type checked and expose type errors
165166
166167
::example='../../playground/src/store.ts'::
167168

Diff for: docs/markdown/5_faq.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# FAQ
22

33
### - should I still use React.PropTypes in TS?
4-
> No. When using TypeScript it is an unnecessary overhead, when declaring IProps and IState interfaces, you will get complete intellisense and compile-time safety with static type checking, this way you'll be safe from runtime errors and you will save a lot of time on debugging. Additional benefit is an elegant and standarized method of documenting your component external API in the source code.
4+
> No. With TypeScript, using PropTypes is an unnecessary overhead. When declaring IProps and IState interfaces, you will get complete intellisense and compile-time safety with static type checking. This way you'll be safe from runtime errors and you will save a lot of time on debugging. Additional benefit is an elegant and standardized method of documenting your component external API in the source code.
55
66
[⇧ back to top](#table-of-contents)
77

0 commit comments

Comments
 (0)