You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@callstack/react-native-brownfield

Package Overview
Dependencies
Maintainers
13
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@callstack/react-native-brownfield

Brownfield helpers for React Native

1.0.0-rc.1
npmnpm
Version published
Weekly downloads
1.9K
48.36%
Maintainers
13
Weekly downloads
 
Created
Source

React Native Brownfield

Set of helpers to make your brownfield integration smooth and easy.

Build Status Version MIT License

PRs Welcome Chat Code of Conduct Sponsored by Callstack

tweet

Features

  • Easily integrate React Native with existing native app
  • Start React Native with one method and invoke code as soon as it's loaded
  • Compatible with both old and new React Native architecture!
  • Reuse the same instance of React Native between different components
  • Use predefined native building blocks - crafted for React Native
  • Disable and enable native gestures and hardware buttons from JavaScript
  • Works well with any native navigation pattern, as well as every React Native JavaScript based navigation
  • Compatible with all native languages Objective-C, Swift, Java and Kotlin
  • Supports UIKit and SwiftUI on iOS and Fragments and Jetpack Compose on Android

Installation

npm install @callstack/react-native-brownfield

or

yarn add @callstack/react-native-brownfield

Enabling New Architecture

Android

Add the following to your android/gradle.properties:

# Enable new architecture
newArchEnabled=true

iOS

Install cocoapods with the flag:

RCT_NEW_ARCH_ENABLED=1 pod install

[!NOTE] New Architecture is enabled by default from React Native 0.76

Usage

React Native Brownfield library works with all major native programming languages. Majority of its API is exposed on the native side. Click on the logo to choose the one that interests you:

Objective-C
Objective-C
Swift
Swift
Java
Java
Kotlin
Kotlin

JavaScript Module

Besides native components, we are exposing JavaScript functions to control the behavior of those components.

To use the module, simply import it:

import ReactNativeBrownfield from '@callstack/react-native-brownfield';

JavaScript API Reference:

setNativeBackGestureAndButtonEnabled(enabled: boolean)

A method used to toggle iOS native back gesture and Android hardware back button.

ReactNativeBrownfield.setNativeBackGestureAndButtonEnabled(true);

popToNative(animated[iOS only]: boolean)

A method to pop to native screen used to push React Native experience.

ReactNativeBrownfield.popToNative(true);

NOTE: Those methods works only with native components provided by this library.

Made with ❤️ at Callstack

React Native Brownfield is an open source project and will always remain free to use. If you think it's cool, please star it 🌟. Callstack is a group of React and React Native geeks, contact us at hello@callstack.com if you need any help with these or just want to say hi!

Like the project? ⚛️ Join the team who does amazing stuff for clients and drives React Native Open Source! 🔥

Contributors

Thanks goes to these wonderful people (emoji key):

Michał Chudziak
Michał Chudziak

💻 📖 🤔
Piotr Drapich
Piotr Drapich

💻 🤔

This project follows the all-contributors specification. Contributions of any kind welcome!

Keywords

react-native-brownfield

FAQs

Package last updated on 26 Mar 2025

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.