Skip to content

Commit 1beee18

Browse files
committed
Adds more indeep comments to understand the example and how to use fluxmax.
1 parent 2a418fd commit 1beee18

File tree

5 files changed

+13
-3
lines changed

5 files changed

+13
-3
lines changed

Readme.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Across the project there will be some hashtags that marks essential parts of flu
1919
- Start [here](./src/index.js). This is the first file loaded in the app and follow the comments from there;
2020
- Read about [stores](./src/stores/Readme.md);
2121
- Read about [views](./src/ui/Readme.md);
22+
- Read about [actions](./src/Actions.js);
2223

2324
*You don't understand something? Open an issue.*
2425

@@ -64,7 +65,7 @@ Go to: [http://localhost:8080/](http://localhost:8080/) (yes, you can click on t
6465
- Click on a complete task to make it non complete;
6566
- Watch the user's points grow;
6667
- Watch how the tasks gets auto completed when the threshold is hit;
67-
- Open up the console and check how exactly the app communicates internally;
68+
- Open up the console, refresh and check how exactly the app communicates internally;
6869

6970

7071

src/stores/Readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@ Here we create stores that inherit from the BaseStore. In this example we have 2
1919

2020
- [TaskStore](./TaskStore.js);
2121
- [UserStore](./UserStore.js);
22+
23+
Now proceed to read the UI. Go to [UI](../ui/Readme.md).

src/stores/TaskStore.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ var TaskStore = function(options){
2121
// #fluxmax-tag
2222
// You really need to set the store's class in the instance
2323
// in this variable. This is needed by the fluxmax system to
24-
// setup all the wiring of your app.
24+
// setup all the wiring of your app. Notice that is not the instance,
25+
// is the Class.
2526
this.Class = TaskStore;
2627
this.__tasks = [];
2728
this.__taskId = 0;
@@ -36,7 +37,7 @@ var TaskStore = function(options){
3637
// #fluxmax-tag
3738
// Here is another essential part of your store. This describes your store's
3839
// entity, such as it's name, which events dispatches and to which events it
39-
// listens to. Read the comments below:
40+
// listens to. We call it entity's metadata. Read the comments below:
4041
var E = TaskStore; // "E" from "Entity".
4142
E.meta = {
4243
// Unique id of this entity. Is a good practice to name stores with the `store.`
@@ -45,6 +46,8 @@ E.meta = {
4546
id: 'store.task',
4647
// What events this entity dispatches. These are the events that your store emits
4748
// to the app. Other views and stores might listen to them.
49+
// You can even document the data it passes. Later this data will use a schema to be checked
50+
// against.
4851
changeTypes: [
4952
'added',
5053
'completed',
@@ -175,3 +178,4 @@ _.extend(TaskStore.prototype, BaseStore.prototype, {
175178

176179

177180
module.exports = TaskStore;
181+
// Now go back to the ./src/stores/Readme.md to continue the read.

src/stores/UserStore.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,4 @@ _.extend(UserStore.prototype, BaseStore.prototype, {
9292

9393

9494
module.exports = UserStore;
95+
// Now go back to the ./src/stores/Readme.md to continue the read.

src/ui/Readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ This folder tree contains all the user interface of the app. Uses react.js to re
55
Go on and open the [Tasks view](./Tasks.js) and the open the [Root view](./Root.js).
66

77
When you are done you might take a look at the [Task view](./Task.js)(This is the item renderer used by the Tasks view, don't confuse them!).
8+
9+
No go to read about [actions](../Actions.js);

0 commit comments

Comments
 (0)