New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@trycourier/react-native-inbox

Package Overview
Dependencies
Maintainers
4
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@trycourier/react-native-inbox

a react native library for tryCourier integration

  • 0.4.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
decreased by-41.67%
Maintainers
4
Weekly downloads
 
Created
Source

@trycourier/react-native-inbox"

a react native library for trycourier integration

Installation

npm install @trycourier/react-native-inbox react-native-linear-gradient
yarn add @trycourier/react-native-inbox react-native-linear-gradient

for ios development, navigate to ios folder in project repository and update pod

pod update

Usage

wrap your parent component using CourierProvider, provide clientKey, userId , brandId as props

import React from 'react';
import { CourierProvider } from '@trycourier/react-native-inbox';

export default function App() {
  return (
    <CourierProvider clientKey={CLIENT_KEY} userId={USER_ID} brandId={BRAND_ID}>
      .....
    </CourierProvider>
  );
}

import and use CourierScreen anywhere in your child component

import { CourierScreen } from '@trycourier/react-native-inbox';

const Demo = () => {
  return (
    <View>
      ...
      <CourierScreen onMessageClick={message => {
          console.log('clicked message data', message);
      }} />
      ...
    </View>
  );
};

the bellIcon

import { BellIcon } from '@trycourier/react-native-inbox';

function BellIconScreen() {
  return (
    <View>
      ...
      <BellIcon showUnreadMessageCount size="md" />
      ...
    </View>
  );
}

CourierProvider props


propdescriptiondefaulttype
onNewMessagecustom function to execute on getting a new Messageundefined(message: ICourierMessage) => void

CourierScreen props


propdescriptiondefaulttype
onMessageClickcustom function to execute on pressing a Messageundefined(message: MessageType) => void

BellIcon props


propdescriptiondefaulttype
showUnreadMessageCountshows number of unread messages as badgefalseboolean
sizesets height and width of the bell icon and badge size"md""md" | "sm" | "lg"
renderrenders custom componentundefined(_numberOfUnreadMessages: number) => JSX.Element

you can find a proper implementation example here.

License

MIT

Keywords

FAQs

Package last updated on 27 Jan 2023

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