I have a simple case
getMeteorData() {
Meteor.subscribe('blog');
const query = {slug: this.props.params.slug};
const blog = Blog.findOne(query, {reactive: false});
return {
blog
};
}
returns undefined
is this expected?
If I use {reactive: true}
or omit the options completely, it returns the doc as expected.
in getMeteorData()
it is expected that data is reactive, which makes sense.
non-reactive data should be called elsewhere in the component, such as the render()
function.
[The guide][1] does infer this
getMeteorData
will reactively rerun when the accessed data changes
&
Warning: render()
is not reactive
While it’s not explict, but this goose-chase was of my own making… i should have RFTM
[1]: http://react-in-meteor.readthedocs.org/en/latest/meteor-data/
2 Likes