mtnptrsn / rn-loading-hoc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React Native Loading HOC

Usage

import React from 'react'
import loadingHoc from 'rn-loading-hoc'

const Post = ({ title }) => (
  <Text>{title}</Text>
)

export default loadingHoc(
  (props) => props.isLoading, // predicate fn (wheter the overlay should be active or not)
  { overlayColor: 'rgba(0,0,0,.6)' } // options
)(Post)

About


Languages

Language:TypeScript 100.0%