You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,7 @@ But that is the kind of dependency we want to avoid in our code. So let's apply
55
55
56
56
### mobservable.makeReactive
57
57
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:
59
59
60
60
```javascript
61
61
var timerData =mobservable.makeReactive({
@@ -73,7 +73,7 @@ var Timer = mobservable.reactiveComponent(React.createClass{
73
73
}));
74
74
```
75
75
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.
77
77
The actual interesting thing about these changes are the things that are *not* in the code:
78
78
79
79
* 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
85
85
* If the `Timer` component would be somewhere deep in our app; only the `Timer` would be re-rendered. Nothing else.
86
86
87
87
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.
* clone the boilerplate repository containing the above example from: https://github.com/mweststrate/react-mobservable-boilerplate
196
196
* or fork this [JSFiddle](https://jsfiddle.net/mweststrate/wgbe4guu/)
197
197
@@ -214,7 +214,7 @@ Either:
214
214
* Reactive views always update atomically, intermediate values will never be visible.
215
215
* Reactive functions evaluate lazily and are not processed if they aren't observed.
216
216
* 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.
218
218
* Exceptions during computations are propagated to consumers.
219
219
220
220
## FAQ
@@ -226,13 +226,13 @@ Mobservabe is *not* a framework. It does not tell you how to structure your code
226
226
**Can I combine flux with mobservable?**
227
227
228
228
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.
230
230
Mobservable already optimizes rendering and since it works with most kinds of data, including cycles and classes.
231
231
So other programming paradigms like classic MVC are now can be easily applied in applications that combine ReactJS with mobservable.
232
232
233
233
**Can I use mobservable together with framework X?**
234
234
235
-
Probably.
235
+
Probably.
236
236
Mobservable is framework agnostic and can be applied in any JS environment.
237
237
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