Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@meteorrn/core

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@meteorrn/core

Full Meteor Client for React Native

  • 2.0.8-beta7
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
45
decreased by-80.35%
Maintainers
1
Weekly downloads
 
Created
Source

Meteor React Native

Connect React Native to your Meteor app. Based on react-native-meteor, and compatible with the latest version of React Native.

API Documentation

You can view a guide to using React Native with Meteor on the Official Meteor Guide

New Package Name

Meteor React Native is now published under @meteorrn/core. We will continue to publish updates to the meteor-react-native repository until 2.1.0. We recommend updating to the new package name as soon as possible.

Installation

  1. npm install --save @meteorrn/core
  2. Confirm you have peer dependencty @react-native-community/netinfo installed
  3. Confirm you have @react-native-community/async-storage@>=1.8.1 installed. If you are using Expo, or otherwise cannot use @react-native-community/async-storage, see Custom Storage Adapter below.

Custom Storage Adapter

This package uses @react-native-community/async-storage by default. This may cause issues if you are using certain React Native versions, or if you are using Expo. To use a custom AsyncStorage implementation, pass it as an option in Meteor.connect:

import { AsyncStorage } from 'react-native';

// ...

Meteor.connect("wss://myapp.meteor.com/websocket", { AsyncStorage });

Basic Usage

import Meteor, { Mongo, withTracker } from '@meteorrn/core';

let MyCol = new Mongo.Collection("mycol");

Meteor.connect("wss://myapp.meteor.com/websocket"); // Note the /websocket after your URL 

class App extends React.Component {
    render() {
        let {myThing} = this.props;
        
        return (
            <View>
                <Text>Here is the thing: {myThing.name}</Text>
            </View>
        );
    } 
}

let AppContainer = withTracker(() => {
    Meteor.subscribe("myThing");
    let myThing = MyCol.findOne();
    
    return {
        myThing
    };
})(App)

export default AppContainer;

Companion Packages

Since React Native apps are completely separate from your Meteor codebase, you can't meteor add packages. For this reason, companion packages to the MeteorRN core will be published under the @meteorrn organization.

Here are the list of official planned companion packages:

  • @meteorrn/ndev-mfa: Client-side features from ndev:mfa
  • @meteorrn/local: Package for storing of data locally that works seamlessly with MeteorRN by injecting data into collection

If you have an idea for a companion package, please open an issue. If you would like to publish your own companion package, we recommend a package name with the prefix mrn-.

Compatibility

For React Native >=0.60.0 use this package

For React Native <0.60.0 use react-native-meteor.

Migrating from react-native-meteor:

  • cursoredFind is no longer an option. All .find() calls will return cursors (to match Meteor)
  • MeteorListView & MeteorComplexListView have been removed
  • CollectionFS has been removed
  • createContainer has been removed
  • Mixins (connectMeteor) have been removed
  • composeWithTracker has been removed

Changelog

The GitHub Releases Tab includes a full changelog

Keywords

FAQs

Package last updated on 23 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc