Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@meteorrn/core
Advanced tools
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.
If you're new to React Native, you can view a guide to using React Native with Meteor on the Official Meteor Guide
npm install --save @meteorrn/core
@react-native-community/netinfo
installed@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.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.
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;
The @meteorrn/core
package has been kept as light as possible. To access more features, you can use companion packages.
Companion packages are NPM packages that are made specifically to extend MeteorRN. And since Atmosphere isn't available in React Native, MeteorRN uses companion packages that contain the client-side/relevant code from a Meteor package to allow your MeteorRN app to use the same package API as your Meteor app.
Native Feature Packages:
@meteorrn/local
(Beta): Package for storing of data locally that works seamlessly with MeteorRN by injecting data into a local minimongo collectionAtmosphere Packages:
@meteorrn/ndev-mfa
(Beta): Package that allows your RN app to work with meteor/ndev:mfa
Planned/Upcoming Packages:
@meteorrn/queued-calls
: Package that allows you to queue Meteor calls that will be performed when internet/server is availableIf 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-
.
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
:
MeteorListView
& MeteorComplexListView
have been removedCollectionFS
has been removedcreateContainer
has been removedconnectMeteor
) have been removedcomposeWithTracker
has been removedWhile 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});
The GitHub Releases Tab includes a full changelog
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:
import Meteor from '@meteorrn/core';
const {AsyncStorage} = Meteor.packageInterface();
FAQs
Full Meteor Client for React Native
The npm package @meteorrn/core receives a total of 33 weekly downloads. As such, @meteorrn/core popularity was classified as not popular.
We found that @meteorrn/core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.