Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@parse/react-native
Advanced tools
Readme
An experimental package that provides you easy, real-time, offline-first interaction with the powerful Parse Server backend from your React Native applications.
First, install the parse and @parse/react-native npm modules into your React Native application.
npm install parse @parse/react-native --save
In your App.js
file, import and initialize Parse:
import { initializeParse } from '@parse/react-native';
initializeParse(
'YOUR_SERVER_URL',
'YOUR_APPLICATION_ID',
'YOUR_JAVASCRIPT_KEY'
);
Now you are ready to use a Parse Query:
import React from 'react';
import { Button, Text, View } from 'react-native';
import Parse from 'parse/react-native.js';
import { useParseQuery } from '@parse/react-native';
const SomeComponent = () => {
const parseQuery = new Parse.Query('SomeClass');
const {
isLive, // Indicates that Parse Live Query is connected
isLoading, // Indicates that the initial load is being processed
isSyncing, // Indicates that the library is getting the latest data from Parse Server
results, // Stores the current results in an array of Parse Objects
count, // Stores the current results count
error, // Stores any error
reload // Function that can be used to reload the data
} = useParseQuery(
parseQuery, // The Parse Query to be used
{
enabled: true, // Enables the parse query (default: true)
enableLocalDatastore: true, // Enables cache in local datastore (default: true)
enableLiveQuery: true // Enables live query for real-time update (default: true)
}
);
return (
<View>
{isLoading && (
<View>
<Text>Loading...</Text>
</View>
)}
{isLive && (
<View>
<Text>Live!</Text>
</View>
)}
{isSyncing && (
<View>
<Text>Syncing...</Text>
</View>
)}
{results && (
<View>
{results.map(result => (
<View>
<Text key={result.id}>
{result.get('someField')}
</Text>
</View>
))}
</View>
)}
<View>
<Text>{count}</Text>
</View>
{error && (
<View>
<Text>{error.message}</Text>
</View>
)}
<View>
<Button
onPress={reload}
title="Reload"
/>
</View>
</View>
);
};
export default SomeComponent;
This package aims to provide easier access to a Parse Server backend when developing React Native applications. It was built on top of the official Parse JS SDK. These two libraries should be used together and you can refer to the sdk documentation in order to learn more about Parse Objects, Parse Queries, and more:
See a Todo List Example.
FAQs
An experimental package that provides you easy, real-time, offline-first interaction with the powerful Parse Server backend from your React Native applications.
The npm package @parse/react-native receives a total of 45 weekly downloads. As such, @parse/react-native popularity was classified as not popular.
We found that @parse/react-native demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.