Dead simple loading components for React and React-Native.
💀 npm i react-bones
React
import { Bones } from "react-bones/lib";
React-Native
import { Bones } from "react-bones/native";
constPost=(props)=>props.loading ? (<View><Bones/><Viewstyle={{padding: 10}}/><Boneswidth={600}height={20}/><Viewstyle={{padding: 10}}/><Boneswidth={600}height={20}/><Viewstyle={{padding: 10}}/><Boneswidth={600}height={20}/><Viewstyle={{padding: 10}}/></View>) : (<View><Imagestyle={{width: 50,height: 50}}source={{uri: props.image}}/><Text>{props.text}</Text></View>);Clone the repo and run yarn run web for a CRA example.
A fully linked React-Native example is coming soon.
For now, cd packages/bones_react_native_app
yarn
yarn run ios
Shoutout to everyone that works on react-native-web It is a great library!