Edit this page on Github

APIs and polyfills

React Native provides a set of APIs and polyfills which allow applications to access native features from JavaScript. All of them can be directly used within an Angular application.

When needed, they are patched so that callbacks are executed in the Angular Zone.

APIs

Polyfills

Usage example

import {Component} from '@angular/core';
import {Alert} from 'react-native';

@Component({
  selector: 'example',
  template: `
<Text (tap)="_showAlert()">Show alert</Text>
`
})
export class Example {
  _showAlert() {
    Alert.alert(
      'Alert Title',
      'My Alert Msg',
      [
        {text: 'Ask me later', onPress: () => console.log('Ask me later pressed')},
        {text: 'Cancel', onPress: () => console.log('Cancel Pressed'), style: 'cancel'},
        {text: 'OK', onPress: () => console.log('OK Pressed')},
      ]
    );
  }
}

Getting started

Features

bootstrapAPIsGesturesHttpRouterStyle

Components

ActivityIndicatorHighLevelComponentImagePickerRefreshControlScrollViewSliderSwitchTextTextInputViewWebView
Android
DrawerLayoutPagerLayoutProgressBarToolbar
iOS
DatePickerNavigatorProgressViewSegmentedControlTabBarTabBarItem

Directives

Opacity feedbackRipple feedback