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

@unimodules/react-native-adapter

Package Overview
Dependencies
Maintainers
27
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@unimodules/react-native-adapter

The adapter to use universal modules with the React Native bridge

  • 6.3.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
162K
increased by4.51%
Maintainers
27
Weekly downloads
 
Created

What is @unimodules/react-native-adapter?

@unimodules/react-native-adapter is a package that provides a bridge between React Native and the Expo unimodules. It allows you to use Expo modules in a bare React Native project, enabling functionalities such as accessing device sensors, file system, and more.

What are @unimodules/react-native-adapter's main functionalities?

Accessing Device Sensors

This feature allows you to access device sensors like the accelerometer. The code sample demonstrates how to import the Accelerometer module and add a listener to receive accelerometer data.

import { Accelerometer } from '@unimodules/react-native-adapter';

Accelerometer.addListener(accelerometerData => {
  console.log(accelerometerData);
});

File System Access

This feature allows you to interact with the device's file system. The code sample shows how to read a file from the document directory.

import { FileSystem } from '@unimodules/react-native-adapter';

FileSystem.readAsStringAsync(FileSystem.documentDirectory + 'example.txt')
  .then(content => {
    console.log(content);
  });

Notifications

This feature allows you to schedule local notifications. The code sample demonstrates how to schedule a notification to be triggered after 1 second.

import { Notifications } from '@unimodules/react-native-adapter';

Notifications.scheduleLocalNotificationAsync({
  title: 'Hello',
  body: 'World',
}, {
  time: new Date().getTime() + 1000
});

Other packages similar to @unimodules/react-native-adapter

Keywords

FAQs

Package last updated on 24 Sep 2021

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