{"id":15013500,"url":"https://github.com/vermiculite/meteorjs-client","last_synced_at":"2025-10-06T07:30:37.551Z","repository":{"id":57295926,"uuid":"54327826","full_name":"vermiculite/meteorjs-client","owner":"vermiculite","description":"Meteor Reactivity for your React Native application :)","archived":false,"fork":true,"pushed_at":"2019-10-11T16:51:17.000Z","size":1344,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-17T08:49:33.808Z","etag":null,"topics":["client","javascript","meteor"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"inProgress-team/react-native-meteor","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vermiculite.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-20T16:24:32.000Z","updated_at":"2020-05-16T06:37:27.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/vermiculite/meteorjs-client","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vermiculite%2Fmeteorjs-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vermiculite%2Fmeteorjs-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vermiculite%2Fmeteorjs-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vermiculite%2Fmeteorjs-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vermiculite","download_url":"https://codeload.github.com/vermiculite/meteorjs-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235510114,"owners_count":19001650,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["client","javascript","meteor"],"created_at":"2024-09-24T19:44:21.661Z","updated_at":"2025-10-06T07:30:32.257Z","avatar_url":"https://github.com/vermiculite.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# meteorjs-client\n\n[![meteorjs-client](http://img.shields.io/npm/dm/meteorjs-client.svg)](https://www.npmjs.org/package/meteorjs-client) [![npm version](https://badge.fury.io/js/meteorjs-client.svg)](http://badge.fury.io/js/meteorjs-client) [![Dependency Status](https://david-dm.org/inProgress-team/meteorjs-client.svg)](https://david-dm.org/inProgress-team/meteorjs-client)\n\n\n# Install\n\n```\nyarn add meteorjs-client\n```\n\nor\n\n```\nnpm i --save meteorjs-client\n```\n# Usage\n\n## Connecting to the server\nShould be done only once.\n\n### Secure connection\nUse the wss protocol for connecting to secure deployments with ssl.\n```js\nMeteor.connect('wss://example.com:3000/websocket')\n```\n\n### Insecure connection\nUse the ws protocol for insecure connections, e.g. during development.\n```js\nMeteor.connect('192.168.1.23')\n```\n\n### Disconnecting\n```js\nMeteor.disconnect()\n```\n\n## Data fetching\n```js\nimport Meteor, {withTracker} from 'meteorjs-client'\n\nimport  SomeComponent from './SomeComponent'\n\nfunction trackerFunction({listId}) {\n  const stuffHandle = Meteor.subscribe('stuffInList', listId)\n  const listHandle = Meteor.subscribe('aList', listId)\n  const stuff = Meteor.collection('stuff').find({listId})\n  const list = Meteor.collection('list').findOne(listId)\n  return {\n    listReady: listHandle.ready(),\n    list,\n    stuffReady: stuffHandle.ready(),\n    stuff,\n  }\n}\n\nexport default withTracker(trackerFunction)(SomeComponent)\n```\n\nHere SomeComponent will receive stuffReady and stuff props.\nUnlike standard Meteor there is no need to call fetch as find returns an array.\n\n## Calling server side methods\n```js\nimport {show} from './my-popup-alerts'\n\nMeteor.call('arrive', function(err) {\n    if (err) {\n      show('Error clocking in')\n    }\n  })\n```\n## Meteor Accounts\n\n### Log in\n```js\nMeteor.loginWithPassword(username, password, (err) =\u003e {\n        this.setState({loggingIn: false})\n        if (err) {\n          this.setState({loginError: true})\n        }\n      })\n```\n\n### Who is logged in?\n```js\nconst user = Meteor.user()\nconst userId = Meteor.userId()\nconsole.log(`User is ${user ? user.username : 'Not logged in'}`)\nconst loggedIn = !!userId\nconst authToken = Meteor.getAuthToken()\n```\n\n### Are we logging in?\nEasily check if we are logging in.\n```js\nconst loggingIn = Meteor.loggingIn()\n```\n\n## Server status\nAre we currently connected to the server.\n```js\nconst {connected, status} = Meteor.status()\n```\n\n## Why does this exist?\nI have used react-native-meteor for some years in production.\nHowever, it is not being kept upto date and stopped me updating to newer react-native versions.\nThis fork was created to stay up to date with changes in react, also reducing the size of the library removing non essential parts. This will aid the process of staying upto date.\n\n## Where is it going?\nThe idea is to have a core js library with implementations for React, Vue, React Native e.t.c.\nThat's the plan lets see how we do\n\n## Want to help ?\n\nPull Requests and issues reported are welcome! :)\n\n## License\n\nmeteorjs-client is [MIT Licensed](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvermiculite%2Fmeteorjs-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvermiculite%2Fmeteorjs-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvermiculite%2Fmeteorjs-client/lists"}