Skip to content

Commit

Permalink
Merge pull request vasanthk#35 from pborreli/typos
Browse files Browse the repository at this point in the history
Fixed typos
  • Loading branch information
elreeda authored Mar 29, 2017
2 parents 2fab34a + c9ec67d commit ef76dc7
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion conventions/02.adding-class-names.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ get classes () {
let classes = ['my-component'];

if (this.state.active) {
classes.push('my-omponent-active');
classes.push('my-component-active');
}

return classes.join(' ');
Expand Down
6 changes: 3 additions & 3 deletions conventions/11.super-in-constructor.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ES6 class constructor super()
Is it necessary to call super() inside constructor?
What is the difference between callling super() and super(props)?
What is the difference between calling super() and super(props)?

### Reference:
- http://cheng.logdown.com/posts/2016/03/26/683329
Expand Down Expand Up @@ -29,7 +29,7 @@ class MyClass extends React.component {
}
}
```
/You may think you can get away with an empty constructor without callling super():
/You may think you can get away with an empty constructor without calling super():
* ES6 class constructors MUST call super if they are subclasses.
* Thus, you have to call super() as long as you have a constructor. (But a subclass does not have to have a constructor)
```javascript
Expand All @@ -38,7 +38,7 @@ class MyClass extends React.component {
} // Error: missing super() call in constructor
}
```
Q: What is the difference between callling super() and super(props)?
Q: What is the difference between calling super() and super(props)?
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.

The effect of passing props when calling super() allows you to access this.props in the constructor:
Expand Down
2 changes: 1 addition & 1 deletion conventions/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Conventions

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

## Articles

Expand Down
2 changes: 1 addition & 1 deletion gotchas/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Gotchas

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.
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.

## Articles

Expand Down
2 changes: 1 addition & 1 deletion patterns/12.event-switch.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const handlers = {

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

```javascript
handleEvent({type}) {
Expand Down
2 changes: 1 addition & 1 deletion patterns/23.flux-pattern.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ We see the we expect the store to have an update method(), so let's modify regis
```javascript
function register(store) {
if (!store || !store.update && typeof store.update === 'function') {
throw new Error('You should provide a store that has an updte method');
throw new Error('You should provide a store that has an update method');
} else {
this._stores.push({store: store});
}
Expand Down
2 changes: 1 addition & 1 deletion patterns/29.feature-flags-using-redux.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function createFeatureFlaggedContainer({
return null;
}

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

return connect((store) => {
Expand Down
2 changes: 1 addition & 1 deletion patterns/32.list-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Lists and other things that are almost components
Instead of making a separate component for lists I can then generate the results like:
```javascript
const SearchSuggestions = (props) => {
// renderSearchSuggestion() behaves as a pseduo SearchSuggestion component
// renderSearchSuggestion() behaves as a pseudo SearchSuggestion component
// keep it self contained and it should be easy to extract later if needed
const renderSearchSuggestion = listItem => (
<li key={listItem.id}>{listItem.name} {listItem.id}</li>
Expand Down
2 changes: 1 addition & 1 deletion styling/05.base-component.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Base Component
### Using a Base Component
There is tremendous amount of flexibility when it comes to composition in React – since components are essentially just functions.
By changing style details in a component to props we can make it more resuable.
By changing style details in a component to props we can make it more reusable.

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

0 comments on commit ef76dc7

Please sign in to comment.