Why is this working without .fetch()?

Hi, I have a question to better understand collections,

I know that .find() returns a cursor, and .fetch() returns the documents but I’m confused to why this is working in react:

Currently in the client I have:

objectReady: Meteor.subscribe('collection').ready(),
currentObject: Collection.find({ "important": true })

And then I pass ‘currentObject’ as a prop to a child of one component, and eventually I pass the document to another child component using:


In which I can then use the data fine:


Is this because [0] pretty much is the same as using .fetch()[0]?

Weird, it should not work.

How do you set the state from the props?

Also, under componentDidUpdate(), can you check the value of this.props.currentObject using console.log(currentObject) or through your debugger?

I should have mentioned I am using react native not just react, so I am using the react-nativigation package to pass the props onClick (also the find() prop is in a Tracker if that is important to note)

            this.props.navigation.navigate('secondPage', {
                currentObject: this.props.currentObject,

And then I set the state on the 2nd page like this:

    state = { 
        currentObject: this.props.navigation.getParam('currentObject', false),

And then I pass the prop once more to a component:

    <TaskComponent firstDoc={this.state.currentObject[0]} />

And then finally, inside the component:


Logging currentObject on the home page gives the complete array of objects - which seems strange to begin with - and on the 2nd page it does the same. Does that mean Tracker is turning it into a fetch()?

I’m not that familiar how Tracker handles the cursors. It might be possible as what you mentioned. What happens when you call fetch() to the supposed cursor?

Returns undefined, even when I make sure it’s ready.

I found this:https://github.com/inProgress-team/react-native-meteor/issues/172

It might just be the way it works

Thanks for your help