Skip to content

💨 💫 ✨ Display some placeholder stuff before rendering your text or media content in React Native

Notifications You must be signed in to change notification settings

Ken-Lim/rn-placeholder

 
 

Repository files navigation

Build Status Coverage Status License: MIT

Display some placeholder stuff before rendering your text or media content in React Native.

Fully compatible with Expo and react-native-web, see examples



Content

Usage

Installation

$ npm install rn-placeholder --save

In your code

import Placeholder from 'rn-placeholder';

/*...*/
render() {
    return (
      <View>
        <Placeholder.ImageContent
          size={60}
          animate="fade"
          lineNumber={4}
          lineSpacing={5}
          lastLineWidth="30%"
          onReady={this.state.isReady}
        >
          <Text>Placeholder has finished :D</Text>
        </Placeholder.ImageContent>
      </View>
    );
  }
/*...*/

When the value of this.state.isReady changes to something existing, the <Text> component will be rendered

About

💨 💫 ✨ Display some placeholder stuff before rendering your text or media content in React Native

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 83.8%
  • Objective-C 9.3%
  • Python 3.7%
  • Java 2.8%
  • HTML 0.4%