I just released a few helpers to make using flux a bit easier.
Since flux updates itself based on actions sent from the dispatcher, we have to watch collections and fire those actions when it changes. Currently there’s too much boilerplate to do this so I made a few helpers.
The flux leaderboard example repo has been updated to use this too.
// watch collections on Minimongo cache and trigger action on change trackCollection(Meteor.users, CollectionActions.usersChanged); trackCollection(Posts, CollectionActions.postsChanged);
as well a helper to just track user data (great for checking if logged in/logged out too)
// watch the logged in user and trigger an action on change trackViewer(CollectionActions.viewerChanged);
`meteor add skinnygeek1010:flux-helpers`