Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var subscribed = new ReactiveVar(false); // Going off memory, i think its like that
- getMeteorData() {
- let subscribed = subscribed.get(); // Important to call get so that getMeteorData continues to watch this.
- return { subscribed }; // Same as { subscribed: subscribed } in babel compiler.
- }
- render() {
- return (<div>{ this.data.subscribed ? 'Subscribed' : 'Click here to subscribed' }</div>);
- }
Advertisement
Add Comment
Please, Sign In to add comment