{"action":"created","issue":{"url":"https://api.github.com/repos/kadirahq/mantra/issues/152","repository_url":"https://api.github.com/repos/kadirahq/mantra","labels_url":"https://api.github.com/repos/kadirahq/mantra/issues/152/labels{/name}","comments_url":"https://api.github.com/repos/kadirahq/mantra/issues/152/comments","events_url":"https://api.github.com/repos/kadirahq/mantra/issues/152/events","html_url":"https://github.com/kadirahq/mantra/issues/152","id":141785970,"number":152,"title":"Newbie Question: Subscribe Syntax?","user":{"login":"VikR0001","id":10912958,"avatar_url":"https://avatars.githubusercontent.com/u/10912958?v=3","gravatar_id":"","url":"https://api.github.com/users/VikR0001","html_url":"https://github.com/VikR0001","followers_url":"https://api.github.com/users/VikR0001/followers","following_url":"https://api.github.com/users/VikR0001/following{/other_user}","gists_url":"https://api.github.com/users/VikR0001/gists{/gist_id}","starred_url":"https://api.github.com/users/VikR0001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VikR0001/subscriptions","organizations_url":"https://api.github.com/users/VikR0001/orgs","repos_url":"https://api.github.com/users/VikR0001/repos","events_url":"https://api.github.com/users/VikR0001/events{/privacy}","received_events_url":"https://api.github.com/users/VikR0001/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-18T06:20:37Z","updated_at":"2016-03-18T08:01:42Z","closed_at":null,"body":"I'm trying to subscribe to a collection called 'planets'. I thought I was duplicating the code from mantra-sample-blog-app-master, but I'm gettting the error \"Uncaught ReferenceError: planets is not defined\"\r\n\r\nFrom containers/home:\r\n```\r\nimport Home from '../components/Home.jsx';\r\nimport {useDeps, composeWithTracker, composeAll} from 'mantra-core';\r\n\r\nexport const composer = ({context, clearErrors}, onData) => {\r\n  const {LocalState} = context();\r\n  const error = LocalState.get('CREATE_USER_ERROR');\r\n  onData(null, {error});\r\n\r\n    const {Meteor, Collections} = context();\r\n    if (Meteor.subscribe('planets.list').ready()) {\r\n      const planets = Collections.planets.find().fetch();\r\n      onData(null, {planets});\r\n    }\r\n\r\n\r\n  // clearErrors when unmounting the component\r\n  return clearErrors;\r\n};\r\n\r\nexport const depsMapper = (context, actions) => ({\r\n  create: actions.users.create,\r\n  clearErrors: actions.users.clearErrors,\r\n  context: () => context\r\n});\r\n\r\nexport default composeAll(\r\n  composeWithTracker(composer),\r\n  useDeps(depsMapper)\r\n)(Home);\r\n\r\n```\r\n\r\nFrom components/home:\r\n\r\n```\r\nimport React from 'react';\r\nimport {TextField, SelectField, MenuItem} from 'material-ui';\r\n\r\nconst Home = ({content = () => null }) => (\r\n  <div>\r\n\t  <SelectField\r\n\t\t  floatingLabelText=\"Floating Label Text\"\r\n\t  >\r\n\t\t  {planets}\r\n\t  </SelectField>\r\n\t  <br />\r\n\t  <SelectField\r\n\t\t  floatingLabelText=\"Styled Floating Label Text\"\r\n\t\t  floatingLabelStyle={{color: 'red'}}\r\n\t  >\r\n\t\t  {planets}\r\n\t  </SelectField>\r\n  \t{content()}\r\n  </div>\r\n);\r\n\r\nexport default Home;\r\n\r\n```\r\n\r\nWhat am I missing? Thanks very much in advance to all for any info."},"comment":{"url":"https://api.github.com/repos/kadirahq/mantra/issues/comments/198244231","html_url":"https://github.com/kadirahq/mantra/issues/152#issuecomment-198244231","issue_url":"https://api.github.com/repos/kadirahq/mantra/issues/152","id":198244231,"user":{"login":"VikR0001","id":10912958,"avatar_url":"https://avatars.githubusercontent.com/u/10912958?v=3","gravatar_id":"","url":"https://api.github.com/users/VikR0001","html_url":"https://github.com/VikR0001","followers_url":"https://api.github.com/users/VikR0001/followers","following_url":"https://api.github.com/users/VikR0001/following{/other_user}","gists_url":"https://api.github.com/users/VikR0001/gists{/gist_id}","starred_url":"https://api.github.com/users/VikR0001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VikR0001/subscriptions","organizations_url":"https://api.github.com/users/VikR0001/orgs","repos_url":"https://api.github.com/users/VikR0001/repos","events_url":"https://api.github.com/users/VikR0001/events{/privacy}","received_events_url":"https://api.github.com/users/VikR0001/received_events","type":"User","site_admin":false},"created_at":"2016-03-18T08:01:42Z","updated_at":"2016-03-18T08:01:42Z","body":"Waitaminnit-- obviously I have to publish it on the server before I can subscribe to it. "}}