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

@synonymdev/react-native-slashtags

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@synonymdev/react-native-slashtags

React Native wrapper for Slashtags

  • 0.0.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
2
Weekly downloads
 
Created
Source

react-native-slashtags

:warning: This is under active development. Please use as your own risk.

Description

An easy-to-implement React Native wrapper for Slashtags.

Getting started

yarn add @synonymdev/react-native-slashtags react-native-webview
#or
npm i -s @synonymdev/react-native-slashtags react-native-webview

# iOS installation
cd ios && pod install && cd ../

Usage

import Slashtags from "@synonymdev/react-native-slashtags";
const App: () => Node = () => {
  // Reference used to call all available Slashtags functions
  const slashRef = useRef();

  // Slashtags component must be included once in your app. Prefereably in the app root.
  return (
    <View>
      <Slashtags
        ref={slashRef}
        onApiReady={() => console.log("Slashtags API ready")}
      />

      <Button
        title={"Self Test"}
        onPress={async () => {
          const res = await slashRef.current.selfTest();
          alert(res);
        }}
      />
    </View>
  );
};

Project breakdown

  • lib: The React Native package that is published to NPM. Responsible for interfacing with the bundled slashtags web app. This will include the prebuilt web app containing all the actual code.
  • web: A simple web app responsible for executing all Slashtags logic and communicating results back to the React Native library.
  • example: An example React Native app demonstrating all available functionality

Development

1. Build web app

 cd web
 yarn && yarn build
 cd ../

2. Bundle web app code into React Native lib

 # From root dir bundle up the web app into a javascript file (lib/src/web-interface.ts)
 node post-build-bundle.js

3. Run example

cd example
yarn && yarn add ../lib
yarn ios
# or
yarn android

4. Adding functions

  1. Add method to web app Interface.tsx
  2. Add corresponding React Native method in lib index.tsx

Keywords

FAQs

Package last updated on 22 Apr 2022

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