score:1

Accepted answer

i see you returned a user key in your container, therefore your data will be accessible via your this.props.user prop in your component.

just make sure you add something like this to your container:

export default foocontainer = createcontainer(() => {
const subscription = meteor.subscribe("userdata");
subscription.ready() ? session.set("dataready", true) : session.set("dataready", false);

  return {
    user: meteor.user()
  };
}

and in your render method:

 render() {
    if(session.get("dataready")){
return (<div>{ /* this.data.user ??? */ }</div>);
}
  }

trust me, it will save you a lot of headache and a lot of errors in the future. this will make sure your data is 100% ready before it's called and rendered in your component.

oh, also assuming you have autopublish removed, publish the particular user's data in order to subscribe to it like i showed above:

meteor.publish("userdata", function(){
  return meteor.users.find({_id: this.userid});
});

just a heads up.


Related Query

More Query from same tag