Skip to content

Commit cabefdd

Browse files
committed
wrote api docs
1 parent 1b8b448 commit cabefdd

5 files changed

Lines changed: 215 additions & 728 deletions

File tree

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ But that is the kind of dependency we want to avoid in our code. So let's apply
5555

5656
### mobservable.makeReactive
5757

58-
The first function is `makeReactive`. It is the swiss knife of mobservable and turns any data structure and function into its reactive counterpart. Objects, arrays, functions; they can all be made reactive. Reactiveness is infectious; new data that is put in reactive data will become reactive as well. To make our timer reactive, just change the first three lines of the code:
58+
The first function is `makeReactive`. It is the swiss knife of mobservable and turns any data structure and function into its reactive counterpart. Objects, arrays, functions; they can all be made reactive. Reactiveness is contagious; new data that is put in reactive data will become reactive as well. To make our timer reactive, just change the first three lines of the code:
5959

6060
```javascript
6161
var timerData = mobservable.makeReactive({
@@ -73,7 +73,7 @@ var Timer = mobservable.reactiveComponent(React.createClass{
7373
}));
7474
```
7575

76-
Thats all folks! Its as simple as that. The `Timer` will now automatically update each time `timerData.secondsPassed` is altered.
76+
Thats all folks! Its as simple as that. The `Timer` will now automatically update each time `timerData.secondsPassed` is altered.
7777
The actual interesting thing about these changes are the things that are *not* in the code:
7878

7979
* The `setInterval` method didn't alter. It still threads `timerData` as a plain JS object.
@@ -85,7 +85,7 @@ The actual interesting thing about these changes are the things that are *not* i
8585
* If the `Timer` component would be somewhere deep in our app; only the `Timer` would be re-rendered. Nothing else.
8686

8787
All this missing code... it will scale well into large code-bases!
88-
It does not only work for plain objects, but also for arrays, functions, classes, deeply nested structures.
88+
It does not only work for plain objects, but also for arrays, functions, classes, deeply nested structures.
8989

9090
<div align="center">
9191
<img src="https://mweststrate.github.io/mobservable/images/overview.png" height="300"/>
@@ -191,7 +191,7 @@ React.render(<TodoList store={todoStore} />, document.getElementById('approot'))
191191
## Getting started
192192

193193
Either:
194-
* `npm install mobservable --save`
194+
* `npm install mobservable --save`
195195
* clone the boilerplate repository containing the above example from: https://github.com/mweststrate/react-mobservable-boilerplate
196196
* or fork this [JSFiddle](https://jsfiddle.net/mweststrate/wgbe4guu/)
197197

@@ -214,7 +214,7 @@ Either:
214214
* Reactive views always update atomically, intermediate values will never be visible.
215215
* Reactive functions evaluate lazily and are not processed if they aren't observed.
216216
* Dependency detection is based on actual values to real-time minify the amount of dependencies.
217-
* Cycles are detected automatically.
217+
* Cycles are detected automatically.
218218
* Exceptions during computations are propagated to consumers.
219219

220220
## FAQ
@@ -226,13 +226,13 @@ Mobservabe is *not* a framework. It does not tell you how to structure your code
226226
**Can I combine flux with mobservable?**
227227

228228
Flux implementations that do not work on the assumption that the data in their stores is immutable should work well with mobservable.
229-
However, the need for flux is less when using mobservable.
229+
However, the need for flux is less when using mobservable.
230230
Mobservable already optimizes rendering and since it works with most kinds of data, including cycles and classes.
231231
So other programming paradigms like classic MVC are now can be easily applied in applications that combine ReactJS with mobservable.
232232

233233
**Can I use mobservable together with framework X?**
234234

235-
Probably.
235+
Probably.
236236
Mobservable is framework agnostic and can be applied in any JS environment.
237237
It just ships with a small function to transform Reactjs components into reactive view functions for convenience.
238-
Mobservable works just as well server side, and is already combined with JQuery (see this [Fiddle](http://jsfiddle.net/mweststrate/vxn7qgdw)) and [Deku](https://gist.github.com/mattmccray/d8740ea97013c7505a9b).
238+
Mobservable works just as well server side, and is already combined with JQuery (see this [Fiddle](http://jsfiddle.net/mweststrate/vxn7qgdw)) and [Deku](https://gist.github.com/mattmccray/d8740ea97013c7505a9b).

0 commit comments

Comments
 (0)