@devlowkey/chat-sdk-react-native

0.3.4 • Public • Published

Lowkey Chat SDK React Native

Lowkey Chat SDK modules for React Native.

Installation

1. Install Lowkey packages:

npm i @devlowkey/chat-sdk-react-native @devlowkey/chat-sdk-core

2. Install peer dependencies:

  • @react-native-clipboard/clipboard
  • expo-image
  • react-native-reanimated
  • react-native-keyboard-controller
  • react-native-mmkv
  • react-native-quick-crypto
  • react-native-unistyles
  • react-native-gesture-handler
  • react-native-pager-view and react-native-tab-view

Note: If your app does not support New Architecture use lower versions of following packages:

"react-native-mmkv": "~2.12.2",

3. Configure SVG icons support:

  • install react-native-svg and react-native-svg-transformer
  • configure Metro as per instruction

Usage

1. Create Lowkey Chat client instance:

import { LowkeyChatClient } from '@devlowkey/chat-sdk-core';

export const lowkeyClient = LowkeyChatClient.getInstance({
  appId: 'YOUR LOWKEY APP ID',
  appKey: 'YOUR LOWKEY APP KEY',
});

2. Wrap your app with providers:

import { LowkeyChatProvider, LowkeyUiProvider } from '@devlowkey/chat-sdk-react-native';
...

  return (
    <LowkeyChatProvider lowkeyClient={lowkeyClient}>
      <LowkeyUiProvider
        // Example of UI themes customization
        themes={{
          light: {
            colors: {
              primary: 'green',
            },
            fonts: {
              regular: 'Arial',
              medium: 'Arial',
              semiBold: 'Arial',
              bold: 'Arial',
            }
          },
        }}>
        <YourApp />
      </LowkeyUiProvider>
    </LowkeyChatProvider>
  );

Now you can use the Lowkey SDK UI and features!

For more detailed examples please check our demo app on GitHub!

Package Sidebar

Install

npm i @devlowkey/chat-sdk-react-native

Weekly Downloads

8

Version

0.3.4

License

ISC

Unpacked Size

1.11 MB

Total Files

296

Last publish

Collaborators

  • alxche
  • lowkeychat
  • ipakhomov