goatslacker / alt

Isomorphic flux implementation
http://alt.js.org/
3.45k stars 323 forks source link

Getting started tut: updateLocations vs. UPDATE_LOCATIONS - explain the automagic! #626

Open rulatir opened 8 years ago

rulatir commented 8 years ago

In the getting started tutorial there is the LocationActions class and a LocationStore class. The LocationActions class defines a method (an action?) named updateLocations. However when the LocationsStore binds a handler to this action, it refers to it as LocationActions.UPDATE_LOCATIONS.

Please add a thorough explanation of the automagic that is going on here.

Colmea commented 8 years ago

+1, still don't get it !

jdlehman commented 8 years ago

This is a constant that is dynamically generated that is used as a reference to the action.

In the docs or on the site