kadirahq / flow-router

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

action after template will render #548

Open sarkistlt opened 8 years ago

sarkistlt commented 8 years ago

How can i track when template is ready to do some action after that?

For example:

FlowRouter.route("/time", {
    action: () => {
        mount(Layout, {
            content: (<Time />)
        });
        console.log(document.getElementById('react-root'));
    }
});

Always return null

PEM-- commented 8 years ago

With the lifecycle of your <Layout> if it's shared with all routes or the <Time> if it's specific to your time route. Check componentDidMount.