kadirahq / flow-router

Carefully Designed Client Side Router for Meteor
MIT License
1.09k stars 195 forks source link

Need more info on how to make current() reactive #610

Closed s-devaney closed 8 years ago

s-devaney commented 8 years ago

I'm super new to Meteor and I'm struggling to complete even a simple task...

I want to add an "active" class to a react component if the current route matches a certain condition. This works on page load but when the route changes the class doesn't update - it's not reactive.

From the docs it looks like I need to use Tracker to make it reactive but I have no idea how to put that together with react meteor data/createContainer so my component re-renders when the path updates.

Any ideas?

s-devaney commented 8 years ago

Solution: https://forums.meteor.com/t/reactively-set-active-class-react-depending-on-which-flowrouter-route-is-active/22441/3