Created
August 25, 2016 06:34
-
-
Save pram/5f9fb853a73330d7bc64510e57a1bc21 to your computer and use it in GitHub Desktop.
Meteor tracker example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
componentDidMount() { | |
this.sub = Meteor.subscribe("itemsRefs", (err) => { | |
let item = Items.findOne(this.props.id) || {}; | |
let state = _.pick(item, "name", "descr"); | |
this.setState(state); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment