@charie/react-skeleton-preload

1.0.1 • Public • Published

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;

Package Sidebar

Install

npm i @charie/react-skeleton-preload

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

11.8 kB

Total Files

5

Last publish

Collaborators

  • charitha95