@anvilapp/react-native-notifications

react native notifications

Usage no npm install needed!

<script type="module">
  import anvilappReactNativeNotifications from 'https://cdn.skypack.dev/@anvilapp/react-native-notifications';
</script>

README

preview

Install

using npm

npm install @anvilapp/react-native-notifications --save

or using yarn

yarn add @anvilapp/react-native-notifications

See the full usage example here.

Usage example

import { NotificationContainer } from '@anvilapp/react-native-notifications';

const notificationsRef = React.createRef();

<NotificationContainer
    ref={notificationRef}
/>

// Show notification
notificationRef.current.open({
    render={() => (
        <View style={styles.notification}>
            <Text style={styles.title}>Title</Text>
            <Text style={styles.text}>Text</Text>
        </View>
    )},
});