Giter VIP home page Giter VIP logo

react-page-loading's Introduction

react-page-loading

react-page-loading version downloads license

React page loading components using to display a loading spin until the page loads completely.

We'd love to have your helping hand on contributions to react-page-loading by forking and sending a pull request!

react-page-loading features

Features

  • Working with react-router

  • Working with react-router-redux

  • ... etc.

Installation

npm install react-page-loading --save

Usage

import React, { Component } from 'react'
import Page from 'react-page-loading'

export default class App extends Component {
  constructor(props) {
    super(props)
  }

  render() {
    return (
      <div>
        <Page loader={"bar"} color={"#A9A9A9"} size={4}>
          <h1>Title</h1>
          <p>content goes here</p>
        </Page>
      </div>
    )
  }
}

Properties

Name Type Default value
loader PropTypes.string bar
color PropTypes.string #A9A9A9
size PropTypes.number 4
duration PropTypes.number 1

loader

Value
bar
bubble-spin
bubble
comet-spin
cylinder-spin
resize-spin
rotate-spin
spin

Contributing

We'd love to have your helping hand on contributions to react-chartjsx by forking and sending a pull request!

Your contributions are heartily ♡ welcome, recognized and appreciated. (✿◠‿◠)

License

MIT License

Copyright (c) 2018 codefacebook, Maintained by Bunlong

react-page-loading's People

Contributors

bunlong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

react-page-loading's Issues

WebpackError: ReferenceError: document is not defined

I got this error when I try to build the website to production

1:44:25 PM: error Building static HTML for pages failed
1:44:25 PM: See our docs page on debugging HTML builds for help https://goo.gl/yL9lND
1:44:25 PM: 9912 |
1:44:25 PM: 9913 | function getColor(props) {
1:44:25 PM: > 9914 | var d = document.createElement('div');
1:44:25 PM: | ^
1:44:26 PM: 9915 | d.style.color = props.color;
1:44:26 PM: 9916 | document.body.appendChild(d);
1:44:26 PM: 9917 | var rgbcolor = window.getComputedStyle(d).color;
1:44:26 PM:

1:44:26 PM: WebpackError: ReferenceError: document is not defined
1:44:26 PM:
1:44:26 PM: - react-page-loading.js:9914 getColor
1:44:26 PM: [lib]/[react-page-loading]/dist/react-page-loading.js:9914:1
1:44:26 PM:
1:44:26 PM: - react-page-loading.js:9926 exports.default
1:44:26 PM: [lib]/[react-page-loading]/dist/react-page-loading.js:9926:1
1:44:26 PM:
1:44:26 PM: - react-page-loading.js:564
1:44:26 PM: [lib]/[react-page-loading]/dist/react-page-loading.js:564:1
1:44:26 PM:
1:44:26 PM:
1:44:26 PM: - react-page-loading.js:546 flatten
1:44:26 PM: [lib]/[react-page-loading]/dist/react-page-loading.js:546:1
1:44:26 PM:
1:44:26 PM: - react-page-loading.js:2456 ComponentStyle.generateAndInjectStyles
1:44:26 PM: [lib]/[react-page-loading]/dist/react-page-loading.js:2456:1
1:44:26 PM:
1:44:26 PM: - react-page-loading.js:2156 StyledComponent.generateAndInjectStyles
1:44:26 PM: [lib]/[react-page-loading]/dist/react-page-loading.js:2156:1
1:44:26 PM:
1:44:26 PM: - react-page-loading.js:2194 StyledComponent.componentWillMount
1:44:26 PM: [lib]/[react-page-loading]/dist/react-page-loading.js:2194:1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.