Skip to content

Commit

Permalink
Site typo/accuracy pass
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon Tilley committed May 18, 2014
1 parent 682817e commit 94888e7
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 11 deletions.
2 changes: 1 addition & 1 deletion examples/carousel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ Components

---

In this small application, only the top level `Application` component requires access to the Flux data (via `this.props.flux`). However, since `Application` mixes in `Fluxbox.FluxMixin`, all children of `Application` automatically have access to the `Fluxbox.Flux` instance at their `this.context.flux` properties.
In this small application, only the top level `Application` component requires access to the Flux data (via `this.props.flux`). However, since `Application` mixes in `Fluxbox.FluxMixin`, all children of `Application` with the appropriate `contextTypes` property automatically have access to the `Fluxbox.Flux` instance at their `this.context.flux` properties.
8 changes: 7 additions & 1 deletion site/contents/documentation/flux-mixin.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ template: page.ejs
Fluxbox.FluxMixin
=================

`Fluxbox.FluxMixin` is a simple React mixin that assists with making a [`Flux`](/documentation/flux.html) instance available to a component hierarchy. Simply pass an instance of `Flux` as a property named `flux` and mix in the component and any descendants of the component that declare `flux` in their `contextTypes` will automatically receive the flux instance on `this.context.flux`.
`Fluxbox.FluxMixin` is a simple React mixin that assists with making a [`Flux`](/documentation/flux.html) instance available to a component hierarchy. Simply pass an instance of `Flux` as a property named `flux` and mix in the mixin and any descendants of the component that declare `flux` in their `contextTypes` will automatically receive the flux instance on `this.context.flux`.

Note that `FluxMixin` is a function that takes `React` as an argument and returns the mixin.

Expand All @@ -26,6 +26,12 @@ var ParentComponent = React.createClass({
});

var ChildComponent: React.createClass({
render: function() {
return <GrandchildComponent />;
}
});

var GrandchildComponent: React.createClass({
contextTypes: {
flux: React.PropTypes.object
},
Expand Down
4 changes: 2 additions & 2 deletions site/contents/documentation/store-watch-mixin.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ template: page.ejs
Fluxbox.StoreWatchMixin
=======================

`Fluxbox.StoreWatchMixin` is a simple React mixin that assists with watching for `"change"` events on one or more stores. Normally, you'd need to bind to store change events in `componentWillMount` and unbind them in `componentWillUnmount` to keep from leaking memory. Additionally, you'd need to set up handlers to pull data from the stores during the appropriate lifecycle hooks (such as `getInitialState`).
`Fluxbox.StoreWatchMixin` is a simple React mixin that assists with watching for `"change"` events on one or more stores. Normally, you'd need to bind to store change events in `componentWillMount` and unbind them in `componentWillUnmount` to keep from leaking memory. Additionally, you'd need to set up handlers to pull data from the stores during change events and lifecycle hooks (such as `getInitialState`).

`StoreWatchMixin` simply requires that you:

Expand Down Expand Up @@ -37,7 +37,7 @@ var stores = {
};
var actions = { ... };

var flux = new Fluxbox.Flux(stores, actiosn);
var flux = new Fluxbox.Flux(stores, actions);

var MyComponent = React.createClass({
mixins: [FluxMixin, StoreWatchMixin("MyStore", "OtherStore")],
Expand Down
2 changes: 1 addition & 1 deletion site/contents/documentation/stores.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ template: page.ejs
Stores
======

In a Flux application, the stores are responsible for managing business log and data. If you're familiar with models in the MVC or similar paradigm, it's important to understand that stores manage more than a single piece of data or a single collection—stores are responsible for a domain of the application.
In a Flux application, the stores are responsible for managing business logic and data. If you're familiar with models in the MVC or similar paradigm, it's important to understand that stores manage more than a single piece of data or a single collection—stores are responsible for a domain of the application.

The *only* way to update stores is to send them an action by way of the dispatcher; stores should not have setter methods or properties that allow users to manipulate the store directly. Stores register their intent to respond to certain action types and actions with those types are routed to the appropriate handlers in the stores. Handlers are called with the action's payload and type as parameters.

Expand Down
2 changes: 1 addition & 1 deletion site/contents/examples/carousel/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Components

---

In this small application, only the top level `Application` component requires access to the Flux data (via `this.props.flux`). However, since `Application` mixes in `Fluxbox.FluxMixin`, all children of `Application` automatically have access to the `Fluxbox.Flux` instance at their `this.context.flux` properties.
In this small application, only the top level `Application` component requires access to the Flux data (via `this.props.flux`). However, since `Application` mixes in `Fluxbox.FluxMixin`, all children of `Application` with the appropriate `contextTypes` property automatically have access to the `Fluxbox.Flux` instance at their `this.context.flux` properties.

<script src="carousel-bundle.js"></script>
<style>
Expand Down
2 changes: 1 addition & 1 deletion site/contents/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ define("someModule", ["Fluxbox"], function(Fluxbox) {
### Standalone

```html
<script src="path/to/fluxbox"></script>
<script src="path/to/fluxbox.js"></script>
```

```javascript
Expand Down
4 changes: 2 additions & 2 deletions site/contents/getting-started/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ React Application

Let's build out our UI with React. Don't forget `/** @jsx React.DOM */` at the top of the file if you're using JSX!

Our top-level `Application` component will use the [FluxMixin](/documentation/flux-mixin.html) as well as the [StoreWatchMixin](/documentation/store-watch-mixin.html) to make our lives a bit easier. It will iterate over the array of todos and emit a `TodoItem` component for each one.
Our top-level `Application` component will use the [FluxMixin](/documentation/flux-mixin.html) as well as the [StoreWatchMixin](/documentation/store-watch-mixin.html) to make our lives a bit easier. The component will iterate over the array of todos and emit a `TodoItem` component for each one.

We'll also add a quick form for adding new todo items, and a button for clearing completed todos.

Expand Down Expand Up @@ -137,7 +137,7 @@ var Application = React.createClass({
});
```

The `TodoItem` component will display and style itself based on the completion of the todo, and will dispatch an action to toggle its state.
The `TodoItem` component will display and style itself based on the completion of the todo, and will dispatch an action indicating its intent to toggle its completion state.

```javascript
var TodoItem = React.createClass({
Expand Down
4 changes: 2 additions & 2 deletions site/contents/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ template: index.ejs
<ul class="features">
<li>...eschews complex MVC hierarchies in favor of a one-way data flow</li>
<li>...makes it easier to reason about changes to your application's data</li>
<li>...helps improves data consistency</li>
<li>...helps improve data consistency</li>
<li>...prevents hard-to-debug cascading updates</li>
<li>...works great with React and compliments its composable components</li>
<li>...works great with React and complements its composable components</li>
</ul>

<div style="padding-top: 20px">
Expand Down
3 changes: 3 additions & 0 deletions site/templates/page.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@
</header>
<section>
<%- page.html %>
<hr>
See a typo? Something still not clear?
<a href="https://github.com/BinaryMuse/fluxbox/issues/new">Report an issue on GitHub</a>.
</section>

<div class="footer-info">
Expand Down

0 comments on commit 94888e7

Please sign in to comment.