Skip to content

Commit c9ec67d

Browse files
committed
Fixed typos
Signed-off-by: Pascal Borreli <[email protected]>
1 parent 2fab34a commit c9ec67d

9 files changed

+11
-11
lines changed

conventions/02.adding-class-names.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ get classes () {
99
let classes = ['my-component'];
1010

1111
if (this.state.active) {
12-
classes.push('my-omponent-active');
12+
classes.push('my-component-active');
1313
}
1414

1515
return classes.join(' ');

conventions/11.super-in-constructor.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ES6 class constructor super()
22
Is it necessary to call super() inside constructor?
3-
What is the difference between callling super() and super(props)?
3+
What is the difference between calling super() and super(props)?
44

55
### Reference:
66
- http://cheng.logdown.com/posts/2016/03/26/683329
@@ -29,7 +29,7 @@ class MyClass extends React.component {
2929
}
3030
}
3131
```
32-
/You may think you can get away with an empty constructor without callling super():
32+
/You may think you can get away with an empty constructor without calling super():
3333
* ES6 class constructors MUST call super if they are subclasses.
3434
* Thus, you have to call super() as long as you have a constructor. (But a subclass does not have to have a constructor)
3535
```javascript
@@ -38,7 +38,7 @@ class MyClass extends React.component {
3838
} // Error: missing super() call in constructor
3939
}
4040
```
41-
Q: What is the difference between callling super() and super(props)?
41+
Q: What is the difference between calling super() and super(props)?
4242
A: Call super(props) only if you want to access this.props inside the constructor. React automatically set it for you if you want to access it anywhere else.
4343

4444
The effect of passing props when calling super() allows you to access this.props in the constructor:

conventions/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Conventions
22

3-
Just a few resonable conventions to follow, since there is no one size fits all.
3+
Just a few reasonable conventions to follow, since there is no one size fits all.
44

55
## Articles
66

gotchas/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Gotchas
22

3-
React is intuitive for the most part, but there are quite a few stumbling points which might caatch you by surprise. We'll discuss more on them here.
3+
React is intuitive for the most part, but there are quite a few stumbling points which might catch you by surprise. We'll discuss more on them here.
44

55
## Articles
66

patterns/12.event-switch.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const handlers = {
4040

4141
You would then have your `handleEvent` function check if the event type has a corresponding handler,
4242
in the handlers object, otherwise use the `default` case.
43-
This way, you don't have to modfiy `handleEvent` each time you need to handle a new event.
43+
This way, you don't have to modify `handleEvent` each time you need to handle a new event.
4444

4545
```javascript
4646
handleEvent({type}) {

patterns/23.flux-pattern.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ We see the we expect the store to have an update method(), so let's modify regis
2525
```javascript
2626
function register(store) {
2727
if (!store || !store.update && typeof store.update === 'function') {
28-
throw new Error('You should provide a store that has an updte method');
28+
throw new Error('You should provide a store that has an update method');
2929
} else {
3030
this._stores.push({store: store});
3131
}

patterns/29.feature-flags-using-redux.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default function createFeatureFlaggedContainer({
2727
return null;
2828
}
2929

30-
// Having `displayName` is very usefull for debuging.
30+
// Having `displayName` is very useful for debuging.
3131
FeatureFlaggedContainer.displayName = `FeatureFlaggedContainer(${ featureName })`;
3232

3333
return connect((store) => {

patterns/32.list-components.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Lists and other things that are almost components
88
Instead of making a separate component for lists I can then generate the results like:
99
```javascript
1010
const SearchSuggestions = (props) => {
11-
// renderSearchSuggestion() behaves as a pseduo SearchSuggestion component
11+
// renderSearchSuggestion() behaves as a pseudo SearchSuggestion component
1212
// keep it self contained and it should be easy to extract later if needed
1313
const renderSearchSuggestion = listItem => (
1414
<li key={listItem.id}>{listItem.name} {listItem.id}</li>

styling/05.base-component.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Base Component
22
### Using a Base Component
33
There is tremendous amount of flexibility when it comes to composition in React – since components are essentially just functions.
4-
By changing style details in a component to props we can make it more resuable.
4+
By changing style details in a component to props we can make it more reusable.
55

66
### Reference:
77
- http://jxnblk.com/writing/posts/patterns-for-style-composition-in-react/

0 commit comments

Comments
 (0)