Created
February 22, 2018 03:31
-
-
Save IamGiel/ecb0a976400344af70f4f78cd0ba4d09 to your computer and use it in GitHub Desktop.
Not sure how I can make `rainDrops` loop inside the NavBar function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import "../styles/NavBar.css"; | |
const drops = 500; | |
const rain = ('<div class="drop" id="drop' + i + '"></div>') | |
for (let i = 0; i < drops.length; i++) { | |
let rainDrops = drops[i]; | |
} | |
const NavBar = () => ( | |
<div> | |
<section className="rain" className="rain" | |
left={Math.floor(Math.random() * (16000 - 0 + 1)) + 1} | |
top={Math.floor(Math.random() * (-1000 - 1400 + 1)) + 1}> | |
{rainDrops} | |
</section> | |
</div> | |
); | |
export default NavBar; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment