npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-shared-module-rn

v0.4.0

Published

use this library to another proj

Downloads

2

Readme

react-native-shared-module-rn

A React Native library providing shared navigation flows and utilities for use across multiple projects.

Installation

npm install react-native-shared-module-rn

Peer Dependencies

This library requires the following peer dependencies:

npm install @react-navigation/native @react-navigation/native-stack react-native-safe-area-context react-native-screens

Or with yarn:

yarn add @react-navigation/native @react-navigation/native-stack react-native-safe-area-context react-native-screens

Usage

StartLibraryFlow Component

The StartLibraryFlow component provides a complete navigation flow with multiple screens (QMS workflow). It can work both as a standalone app and as a library integrated into existing apps.

Standalone Usage (Default)

When using as a standalone app or in your library's example app, the component includes its own NavigationContainer:

import React from 'react';
import { View } from 'react-native';
import { StartLibraryFlow } from 'react-native-shared-module-rn';

export default function App() {
  return (
    <View style={{ flex: 1 }}>
      {/* No NavigationContainer needed - included by default */}
      <StartLibraryFlow />
    </View>
  );
}

Integration with Existing Navigation

When integrating into an app that already has a NavigationContainer, use the asLibrary prop to prevent nested navigation containers:

import React from 'react';
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import { StartLibraryFlow } from 'react-native-shared-module-rn';

const Stack = createNativeStackNavigator();

export default function App() {
  return (
    <NavigationContainer>
      <Stack.Navigator>
        <Stack.Screen name="Home" component={HomeScreen} />
        <Stack.Screen name="LibraryFlow">
          {() => <StartLibraryFlow asLibrary={true} />}
        </Stack.Screen>
      </Stack.Navigator>
    </NavigationContainer>
  );
}

Using LibraryNavigator Directly

For more control, you can import and use the LibraryNavigator directly:

import React from 'react';
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import { LibraryNavigator } from 'react-native-shared-module-rn';

const Stack = createNativeStackNavigator();

export default function App() {
  return (
    <NavigationContainer>
      <Stack.Navigator>
        <Stack.Screen name="Home" component={HomeScreen} />
        <Stack.Screen name="LibraryFlow" component={LibraryNavigator} />
      </Stack.Navigator>
    </NavigationContainer>
  );
}

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | asLibrary | boolean | false | Set to true when using this library in another app that already has a NavigationContainer. When true, the component will not wrap itself in a NavigationContainer. |

Important Notes

  • Default behavior: The component includes its own NavigationContainer for standalone usage
  • Library integration: Pass asLibrary={true} when your app already has a NavigationContainer
  • The component manages navigation between Screen A, Screen B, and Screen C
  • Ensure the component is rendered in a container with flex: 1 for proper display

Utility Functions

multiply

A simple utility function demonstrating native module integration:

import { multiply } from 'react-native-shared-module-rn';

const result = multiply(3, 7);
console.log(result); // 21

Contributing

License

MIT


Made with create-react-native-library