@charie/react-skeleton-preload
v1.0.1
Published
light weight react skeleton preloder
Downloads
1
Maintainers
Readme
React skeleton preloader.
Demo
Live on: https://react-skeleton-loading.netlify.app/
How to use
Installation
npm i @charie/react-skeleton-preload
How to use
import React, { useEffect, useState } from "react";
import Skeleton from "@charie/react-skeleton-preload";
function App() {
const [title, setTitle] = useState('');
useEffect(() => {
setTimeout(() => { setTitle('hello world') }, 3000)
}, []);
return <h2 style={{ width: 150 }}>{title || <Skeleton />}</h2>
}
export default App;