Skip to content

Commit d5acc1e

Browse files
committed
Merge pull request reactjs#38 from lizell/master
Added IntelliJ project files ignore and fixed minor spelings
2 parents e30e1d8 + 1725f81 commit d5acc1e

File tree

7 files changed

+11
-10
lines changed

7 files changed

+11
-10
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ npm-debug.log
33
.DS_Store
44
dist
55
nested-dispatch.js
6-
test.js
6+
test.js
7+
.idea

05_get-state.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ console.log('redux state after initialization:', store_3.getState())
102102
// - using Object.assign (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
103103
// - using manual merge
104104
// - or whatever other strategy that suits your needs and the structure of your state since
105-
// Redux is absolutely NOT opiniated on this (remember, Redux is a state container).
105+
// Redux is absolutely NOT opinionated on this (remember, Redux is a state container).
106106

107107
// Now that we're starting to handle actions in our reducer let's speak about having multiple reducers and
108108
// combining them.

08_dispatch-async-action-1.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// that produce an action synchronously: when called, an action is returned immediately.
88

99
// Let's now imagine a simple asynchronous use-case:
10-
// 1) user clicks on button "Say Hi in 2 second"
10+
// 1) user clicks on button "Say Hi in 2 seconds"
1111
// 2) When button "A" is clicked, we'd like to show message "Hi" after 2 seconds have elapsed
1212
// 3) 2 seconds later, our view is updated with the message "Hi"
1313

09_dispatch-async-action-2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ store_0.dispatch(asyncSayActionCreator_1('Hi'))
4444
// ...
4545

4646
// It seems that our function didn't even reach our reducers. But Redux has been kind enough to give us a
47-
// tips: "Use custom middleware for async actions.". It looks like we're on the right path but what is this
47+
// tip: "Use custom middleware for async actions.". It looks like we're on the right path but what is this
4848
// "middleware" thing?
4949

5050
// Just to reassure you, our action creator asyncSayActionCreator_1 is well-written and will work as expected

11_state-subscriber.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ store_0.dispatch(addItemActionCreator({ id: 1234, description: 'anything' }))
6262

6363
// Our subscribe callback is correctly called and our store now contains the new item that we added.
6464

65-
// Theorically speaking we could stop here. Our Flux loop is closed, we understood all concepts that make
65+
// Theoretically speaking we could stop here. Our Flux loop is closed, we understood all concepts that make
6666
// Flux and we saw that it is not that much of a mystery. But to be honest, there is still a lot to talk
6767
// about and a few things in the last example were intentionally left aside to keep the simplest form of this
6868
// last Flux's concept:

12_src/src/create-store.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
// One thing to notice though: we're not using the thunk middleware that we've seen before. Instead
77
// we use a promise middleware solution that will allow us to handle asynchronous action creators and
88
// to do some nice real time updates on our UI (could also be some optimistic updates).
9-
// This middleware was discussed here: https://github.com/gaearon/redux/issues/99 and it is used
9+
// This middleware was discussed here: https://github.com/gaearon/redux/issues/99 and it is used
1010
// in this very good react-redux-universal-example: https://github.com/erikras/react-redux-universal-hot-example
1111
// that I strongly suggest you get a look at (later, not right now ;)).
1212

1313
import { createStore, applyMiddleware, combineReducers } from 'redux'
14-
// You can go and see code for this middleware, it's not very complicated and makes a good
15-
// excercise to sharpen your understanding on middlewares.
14+
// You can go and see the code for this middleware, it's not very complicated and makes a good
15+
// exercise to sharpen your understanding on middlewares.
1616
import promiseMiddleware from './promise-middleware'
1717
// We'll just have one reducer in this application but the ES6 import notation below is
1818
// pretty interesting to import and produce a reducers hash in one go. Have a look in

12_src/src/home.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import React from 'react'
2222
import { connect } from 'react-redux'
2323
// We use the same ES6 import trick to get all action creators and produce a hash like we did with
24-
// our reducers. If you haven't yet, go get a look at our action creator (./actions-creator.js).
24+
// our reducers. If you haven't yet, go get a look at our action creator (./actions-creators.js).
2525
import * as actionCreators from './action-creators'
2626

2727
// The "connect" decorator takes as its only parameter, a function that will select which slice of your
@@ -74,4 +74,4 @@ export default class Home extends React.Component {
7474
}
7575
}
7676

77-
// Go to ./final-words.jsx for our last advice about what to do now...
77+
// Go to ./13_final-words.js for our last advice about what to do now...

0 commit comments

Comments
 (0)