Content Loader - lazaronixon/react-native-turbolinks GitHub Wiki

This Wiki show you how to use React Native Turbolinks integrated with react-content-loader.

Installation

$ yarn add react-content-loader react-native-svg
$ cd ios && pod install && cd .. # CocoaPods on iOS needs this extra step

SkeletonView

import React, { Component } from 'react'
import { View, StyleSheet } from 'react-native'
import { Facebook } from 'react-content-loader/native'

export default class SkeletonView extends Component {

  render() {
    return (
      <View style={styles.container}>
        <Facebook/>
        <Facebook/>
        <Facebook/>
        <Facebook/>
        <Facebook/>
      </View>
    )
  }

}

const styles = StyleSheet.create({
  container: {
    paddingLeft: 20,
    paddingTop: Platform.OS === 'ios' ? 100 : 10,
  }
})

Usage

Turbolinks.startSingleScreenApp({url: baseUrl}, {loadingView: 'SkeletonView'})
⚠️ **GitHub.com Fallback** ⚠️