Expo equivalent of react-native-skeleton-loading
npm install expo-skeleton-loading| | | | | |
| --------------------------------------- | -------- | ---------- |---------- |---------- |
| !NPM VERSION | !NPM WEEKLY DOWNLOADS | !GITHUB STAR | !YOUTUBE VIEWS | !NPM LIFETIME DOWNLOADS
sh
$ npm install expo-skeleton-loading
`
OR
`sh
$ yarn add expo-skeleton-loading
`
Setup
This package is based on react-natve-reanimated 3 so according to their documentation,
you need to initialize that in babel.config.js. To do that stop the metro bundler and
then add following line of code to the return object of babel.config.js
`js
plugins: ['react-native-reanimated/plugin']
`
After adding the line of code, start the bundler or project with --clear tag like,
`sh
npx expo start --clear
`
This will clear the bundler cache and you are ready to go.
> NOTE: If you face issues in production version like app crashes, then you will need to add @react-native-masked-view/masked-view.
> For that command is
`sh
npx expo install @react-native-masked-view/masked-view
`
š Displaying the skeleton loading
All you need is to just import the skeleton loading component, and in between the
closing and ending tags, you can design the UI of your skeleton loading screen
as shown in the code snippet below:
`jsx
import SkeletonLoading from 'expo-skeleton-loading'
const App = () => {
return(
)
};
`
For Live Demo (Expo Snack)
ā Props for the component
| Name | Type | Description |
| ---- | ----------- | ----------- |
| background | hex color string | Hex color string for the background of loading component
| highlight | hex color string | Hex color string for the highlight of loading component
š² Would you like to support me?
If you would like me come up with similar packages, buy me a cup of coffee to boost my energy.

ā¶ļø Watch Tutorial Video
