2.3.1 • Published 9 months ago

@novu/react-native v2.3.1

Weekly downloads
-
License
ISC
Repository
github
Last release
9 months ago

Novu's React Native SDK for building custom inbox notification experiences.

Novu provides the @novu/react-native a React library that helps to add a fully functioning Inbox to your mobile application in minutes. Let's do a quick recap on how you can easily use it in your application. See full documentation here.

Installation

  • Install @novu/react-native npm package in your react app
npm install @novu/react-native

Getting Started

  • Add the below code in the app.tsx file
import { NovuProvider } from '@novu/react-native';

import { useNotifications } from '@novu/react';

function YourCustomInbox() {
  const { notifications, isLoading, fetchMore, hasMore } = useNotifications();

  return (
    <Show when={!isLoading} fallback={<NotificationListSkeleton />}>
      <Show when={notifications && notifications.length > 0} fallback={<EmptyNotificationList />}>
        <InfiniteScroll
          dataLength={notifications?.length ?? 0}
          fetchMore={fetchMore}
          hasMore={hasMore}
          loader={<LoadMoreSkeleton />}
        >
          {notifications?.map((notification) => {
            return <NotificationItem key={notification.id} notification={notification} />;
          })}
        </InfiniteScroll>
      </Show>
    </Show>
  );
}
2.2.0-rc.3

9 months ago

2.3.1

9 months ago

2.2.0-rc.2

10 months ago

2.2.0-rc.1

10 months ago