All Projects â†’ TheRealNate â†’ meteor-react-native

TheRealNate / meteor-react-native

Licence: other
Meteor client for React Native matching Meteor Spec

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to meteor-react-native

Meteor-flow-router-title
Change document.title on the fly within flow-router
Stars: ✭ 23 (-46.51%)
Mutual labels:  meteor, meteorjs
flow-router
🚦 Carefully extended flow-router for Meteor
Stars: ✭ 191 (+344.19%)
Mutual labels:  meteor, meteorjs
Nosqlclient
Cross-platform and self hosted, easy to use, intuitive mongodb management tool - Formerly Mongoclient
Stars: ✭ 3,399 (+7804.65%)
Mutual labels:  meteor, meteorjs
Meteor-logger
🧾 Meteor isomorphic logger. Store application logs in File (FS), MongoDB, or print in Console
Stars: ✭ 51 (+18.6%)
Mutual labels:  meteor, meteorjs
meteor-blaze-bs4
Generic Bootstrap 4 components library for Meteor Blaze.
Stars: ✭ 20 (-53.49%)
Mutual labels:  meteor, meteorjs
awesome-blaze
🔥A curated list of awesome things related to Blaze
Stars: ✭ 29 (-32.56%)
Mutual labels:  meteor, meteorjs
setup-meteor
Set up your GitHub Actions workflow with a specific version of Meteor.js
Stars: ✭ 17 (-60.47%)
Mutual labels:  meteor, meteorjs
svelte-meteor-data
Reactively track Meteor data inside Svelte components
Stars: ✭ 14 (-67.44%)
Mutual labels:  meteor, meteorjs
Meteor-logger-file
🔖 Meteor Logging: Store application log messages into file (FS)
Stars: ✭ 24 (-44.19%)
Mutual labels:  meteor, meteorjs
MeteorCandy-meteor-admin-dashboard-devtool
The Fast, Secure and Scalable Admin Panel / Dashboard for Meteor.js
Stars: ✭ 50 (+16.28%)
Mutual labels:  meteor, meteorjs
fragments
Organise your bookmarks into boards
Stars: ✭ 56 (+30.23%)
Mutual labels:  meteor, meteorjs
Meteor-logger-mongo
🍃 Meteor Logging: Store application log messages in MongoDB
Stars: ✭ 20 (-53.49%)
Mutual labels:  meteor, meteorjs
Meteor-Template-helpers
Template helpers for Session, logical operations and debug
Stars: ✭ 35 (-18.6%)
Mutual labels:  meteor, meteorjs
meteorman
A DDP client with GUI (The Postman for Meteor)
Stars: ✭ 51 (+18.6%)
Mutual labels:  meteor, meteorjs
meteor-search
🔍 SPIKE of full-text search in MongoDB using Meteor
Stars: ✭ 40 (-6.98%)
Mutual labels:  meteor, meteorjs
hypersubs
an upgraded version of Meteor subscribe, which helps optimize data and performance!
Stars: ✭ 13 (-69.77%)
Mutual labels:  meteor, meteorjs
compass-react-native-expo
A simple compass app built with expo & react-native. Non-expo version - https://github.com/rahulhaque/compass-react-native
Stars: ✭ 37 (-13.95%)
Mutual labels:  expo
Parrot
Web router specially designed for building SPAs using Meteor
Stars: ✭ 75 (+74.42%)
Mutual labels:  meteor
oplayer
👾 react native video player for expo
Stars: ✭ 25 (-41.86%)
Mutual labels:  expo
acharep
🏠 App to find fraternities near your university
Stars: ✭ 23 (-46.51%)
Mutual labels:  expo

Meteor React Native

A set of packages allowing you to connect your React Native app to your Meteor server, and take advantage of Meteor-specific features like accounts, reactive data trackers, etc. Compatible with the latest version of React Native.

Check out the @meteorrn github org for more packages, examples, and tutorials.

Full API Documentation

If you're new to React Native, you can view a guide to using React Native with Meteor on the Official Meteor Guide

Installation

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

A note on AsyncStorage

This package uses `@react-native-async-storage/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 });

If you are using the AsyncStorage API yourself, its important that you use the same version that MeteorRN is using, or issues could be caused due to the conflicting versions. Make sure you are using the same AsyncStorage you pass into Meteor (or @react-native-async-storage/async-storage if you aren't passing anything), or you can use MeteorRN's package interface.

Basic Usage

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

// "mycol" should match the name of the collection on your meteor server, or pass null for a local collection
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;

Unique Scenarios: Running the app on a physical device but want to connect to local development machine? Check out this issue comment.

Companion Packages

The @meteorrn/core package has been kept as light as possible. To access more features, you can use companion packages.

Here are some examples:

  • @meteorrn/oauth-google: Allows you to let users login to your app with Google
  • @meteorrn/oauth-facebook: Allows you to let users login to your app with Facebook

For the full list of officially recognized packages, check out the @meteorrn github org.

Compatibility

This package is compatible with React Native versions from 0.60.0 to latest (0.63.2)

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

Using on Web

While this package was designed with React Native in mind, it is also capable of running on web (using react-dom). This can be useful if you need a light-weight Meteor implementation, if you want to create a client app separate from your server codebase, etc. The only change required is providing an AsyncStorage implementation. Here is a simple example:

const AsyncStorage = {
    setItem:async (key, value) => window.localStorage.setItem(key, value),
    getItem:async (key) => window.localStorage.getItem(key)
    removeItem:async (key) => window.localStorage.removeItem(key)    
}

Meteor.connect("wss://.../websock", {AsyncStorage});

Changelog

The GitHub Releases Tab includes a full changelog

Package Interface

To ensure that MeteorRN companion packages use the same versions of external packages like AsyncStorage as the core, @meteorrn/core provides a package interface, where companion packages can access certain packages. Currently package interface returns an object with the following properties:

  • AsyncStorage

Usage

import Meteor from '@meteorrn/core';

const {AsyncStorage} = Meteor.packageInterface();

Differences from Meteor Core to Note:

  • This API does not implement observeChanges (but it does implement observe)

Showcase

Whazzup.co StarlingRealtime
Whazzup.co uses Meteor React Native in their native app StarlingRealtime uses Meteor React Native in their production app

Meteor React Native is maintained by Nathaniel Dsouza who is available for consultation: [email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].