Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 852 Bytes

README.md

File metadata and controls

35 lines (24 loc) · 852 Bytes

GitHub release (latest by date) GitHub code size in bytes Travis (.org)

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;