JavaScript Module

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

Usage

To use the module, import it:

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

Methods

setNativeBackGestureAndButtonEnabled

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

ReactNativeBrownfield.setNativeBackGestureAndButtonEnabled(enabled: boolean);

Parameters:

ParamTypeDescription
enabledbooleanWhether to enable native back gesture and button

Example:

ReactNativeBrownfield.setNativeBackGestureAndButtonEnabled(true);

popToNative

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

ReactNativeBrownfield.popToNative(animated: boolean);

Parameters:

ParamTypeDescription
animatedbooleanWhether to animate the transition (iOS only)

Example:

ReactNativeBrownfield.popToNative(true);
Note

These methods work only with native components provided by this library.

Need React or React Native expertise you can count on?