Socket
Socket
Sign inDemoInstall

@react-native-community/toolbar-android

Package Overview
Dependencies
514
Maintainers
41
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @react-native-community/toolbar-android

A React Native Component for Android Toolbar


Version published
Weekly downloads
14K
decreased by-0.29%
Maintainers
41
Install size
67.5 kB
Created
Weekly downloads
 

Readme

Source

@react-native-community/toolbar-android

CircleCI Supports Android MIT License npm version Lean Core Extracted

What is it?

A React component that wraps the Android-only Toolbar widget.

This is extracted from react-native per lean core initiative, which removed ToolbarAndroid at v0.61. The goal of this repo is to house the original component and continue to improve and maintain a lean wrapper with zero dependency other than react and react-native.

Alt text

Getting started

yarn add @react-native-community/toolbar-android

or

npm install @react-native-community/toolbar-android --save

Now link the native code with your project:

# RN >= 0.60
npx pod-install

# RN < 0.60
react-native link @react-native-community/toolbar-android

Manual installation

Manually link the library on Android
android/settings.gradle
include ':react-native-community-toolbar-android'
project(':react-native-community-toolbar-android').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/toolbar-android/android')
android/app/build.gradle
dependencies {
   ...
   implementation project(':react-native-community-toolbar-android')
}
android/app/src/main/.../MainApplication.java

On top, where imports are:

import com.reactnativecommunity.toolbarandroid.ReactToolbarPackage;

Add the toolbar-android class to your list of exported packages.

@Override
protected List<ReactPackage> getPackages() {
    return Arrays.asList(
            new MainReactPackage(),
            new ReactToolbarPackage()
    );
}

Migrating from the core react-native module

This module was created when the ToolbarAndroid was split out from the core of React Native. To migrate to this module you need to follow the installation instructions above and then change you imports from:

import { ToolbarAndroid } from 'react-native';

to:

import ToolbarAndroid from '@react-native-community/toolbar-android';

Usage

see ToolbarAndroid

Contributors

This module was extracted from react-native core.

License

The library is released under the MIT licence. For more information see LICENSE.

Keywords

FAQs

Last updated on 03 Sep 2021

Did you know?

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc