Skip to content

Instantly share code, notes, and snippets.

@cdaz5
Created May 2, 2018 21:38
Show Gist options
  • Select an option

  • Save cdaz5/750813ce2e394876c1f4ddeb787b0adf to your computer and use it in GitHub Desktop.

Select an option

Save cdaz5/750813ce2e394876c1f4ddeb787b0adf to your computer and use it in GitHub Desktop.
index.js
import React from "react";
import { render } from "react-dom";
import styled from "styled-components";
// we import our new loaders
import PulseLoader from "./PulseLoader";
import BouceLoader from "./BouceLoader";
// we create a div to hold our components to give them some breathing room
// otherwise they would render on top of each other
const Container = styled.div`
display: flex;
width: 100vw;
height: 100vh;
justify-content: space-around;
align-items: center;
`;
// we pass the loading prop when rendering otherwise they would not show up
const App = () => (
<Container>
<PulseLoader loading />
<BouceLoader loading />
</Container>
);
render(<App />, document.getElementById("root"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment