Rangle.io: React Native Workshop
gitbook
gitbook
  • Introduction
  • Setup
    • Hello World
    • Debugging
  • Core Concepts
    • Components
    • Styles
    • Flexbox
    • APIs
  • Navigation
    • Navigation Experimental
    • Creating Some Helpers
    • The Navigator Component
  • ListView (Pokédex)
    • List View
    • List View: Render Row
    • Text Input
    • Keyboard Spacer
  • Selectors (Filtering)
  • Animation
    • LayoutAnimation
    • Animated
      • Animated.Value
      • Timing, Spring & Decay
      • Animated Components
      • More Animated
    • Resources
    • Exercise
  • ScrollView (Pokemon Details)
  • MapView
  • Testing
  • Gesture Responder System
    • PanResponder
Powered by GitBook
On this page
  • Commonly Used APIs
  • Polyfills

Was this helpful?

  1. Core Concepts

APIs

PreviousFlexboxNextNavigation

Last updated 6 years ago

Was this helpful?

Certain native functionalities are exposed as APIs. For example, datepicker is a component on iOS: . However, it's an API on Android: .

Commonly Used APIs

Dimensions provides you the screen size.

AsyncStorage provides a LocalStorage style API for storage on the device.

InteractionManager allows you to register long-running work to be scheduled after any interactions/animations have completed.

PixelRatio class gives access to the device pixel density.

Polyfills

React Native provides native polyfills for the following APIs:

  • Flexbox layout module

  • ShadowPropTypesIOS so that you can define shadows in CSS

  • Geolocation which follows the web spec:

  • Network fetch, XHR & WebSockets

  • Timers: setTimeout, requestAnimationFrame, setInterval, etc.

  • Named colors in CSS

DatePickerIOS
DatePickerAndroid
https://developer.mozilla.org/en-US/docs/Web/API/Geolocation