Closed appsforartists closed 9 years ago
Similarly, getTotal
should be called totalGetter
, to match the preceding section:
var over100Getter = [
getTotal,
function(total) {
return total > 100
}
]
reactor.observe(over100Getter, function(isOver100) {
if (isOver100) {
alert('Shopping cart over 100!')
}
})
And this should be reactor.ReactMixin
:
var React = require('react')
var ShoppingCart = React.createClass({
mixins: [react.ReactMixin],
syncronously should be synchronously.
Utilties should be Utilities
Hi!
Thanks for suggesting these changes. Feel free to open a PR and I will gladly merge.
Otherwise I will make these changes later this week.
In the example, the
taxPercent
store is setup thusly:percent
is a confusing name, since presumably both values are percentages. Since this is an example, clarity is especially important. I suggeststate
andpayload
, to maintain the convention used throughout the rest of the document.oldPercent
andnewPercent
would also be good choices.