Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Meteor Reactivity for your React Native application :)

License

NotificationsYou must be signed in to change notification settings

inProgress-team/react-native-meteor

Repository files navigation

react-native-meteornpm versionDependency Status

Meteor-like methods for React Native.

If you have questions, you can open a new issue in the repository or ask in the our Gitter chat:
https://gitter.im/react-native-meteor/Lobby

What is it for ?

The purpose of this library is :

  • To set up and maintain a ddp connection with a ddp server, freeing the developer from having to do it on their own.
  • Be fully compatible with react-native and help react-native developers.
  • To match withMeteor documentation used with React.

Install

yarn add react-native-meteor

or

npm i --save react-native-meteor

!! See detailed installation guide

Compatibility notes

Since RN 0.26.0 you have to use ws or wss protocol to connect to your meteor server. http is not working on Android.

It is recommended to always use the latest version of react-native-meteor compatible with your RN version:

  • For RN > 0.49, usereact-native-meteor@latest
  • For RN > 0.45, usereact-native-meteor@1.1.x
  • For RN = 0.45, usereact-native-meteor@1.0.6
  • For RN < 0.45, you can use versionreact-native-meteor@1.0.3 in case or problems.

Example usage

importReact,{Component}from'react';import{View,Text}from'react-native';importMeteor,{withTracker,MeteorListView}from'react-native-meteor';Meteor.connect('ws://192.168.X.X:3000/websocket');//do this only onceclassAppextendsComponent{renderRow(todo){return<Text>{todo.title}</Text>;}render(){const{ settings, todosReady}=this.props;return(<View><Text>{settings.title}</Text>{!todosReady&&<Text>Not ready</Text>}<MeteorListViewcollection="todos"selector={{done:true}}options={{sort:{createdAt:-1}}}renderRow={this.renderRow}/></View>);}}exportdefaultwithTracker(params=>{consthandle=Meteor.subscribe('todos');Meteor.subscribe('settings');return{todosReady:handle.ready(),settings:Meteor.collection('settings').findOne(),};})(App);

Documentation

Author

image

Want to help ?

Pull Requests and issues reported are welcome! :)

License

react-native-meteor isMIT Licensed.

About

Meteor Reactivity for your React Native application :)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors23


[8]ページ先頭

©2009-2025 Movatter.jp