Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
Joe Narvaez
@wordyallen
can I get help on portfolio?
Frank XC
@tenkdayz
@wordyallen go.
Joe Narvaez
@wordyallen
nvm. its going pretty good
Greg Duncan
@GregatGit
@karpimpski what are you trying to do - i"m not quite sure
Michael Karpinski
@karpimpski
@GregatGit make a Simon game. for now I'm trying to get the buttons to fade one at a time
@GregatGit I'm generating a random number, pushing its color value to an array, and looping through the array trying to light up each button one at a time
Greg Duncan
@GregatGit
@karpimpski A loop with the timer value timed by the index
Michael Karpinski
@karpimpski
how do you add a timer value to the loop? sorry, I've never done that
Joe Narvaez
@wordyallen
setTimeout
welcome to the wonderful world of callbacks and async <3
CamperBot
@camperbot

welcome to FreeCodeCamp @wordyallen!

Joe Narvaez
@wordyallen
haha
Michael Karpinski
@karpimpski
@wordyallen do I just add setTimeout(1000) at the end of my loop?
Jeremy Roe
@jeremyroe
any React users on here I have a state question
Joe Narvaez
@wordyallen
@jeremyroe I'm all ears
Jeremy Roe
@jeremyroe
Thanks @wordyallen - I’m getting an undefined trying to set my state - Can I share code?
CamperBot
@camperbot
jeremyroe sends brownie points to @wordyallen :sparkles: :thumbsup: :sparkles:
Greg Duncan
@GregatGit
@karpimpski
for (var i = 0; i < yourArr.length; i++) {
    setTimeout(yourFucntion, 750 * i);
  }
CamperBot
@camperbot
:star: 413 | @wordyallen | http://www.freecodecamp.com/wordyallen
Jeremy Roe
@jeremyroe
http://codepen.io/jeremyroe/pen/zqGRvO?editors=0010 it’s in the StreamerBox component Line 72
Joe Narvaez
@wordyallen
@karpimpski
    setTimeout(() => {
      yourFunct();
    }, 1000)
Jeremy Roe
@jeremyroe
@wordyallen I get a undefined.state.hoverActive = true; which makes me think this isn’t bound correctly or I’m not working in the correct scope
Joe Narvaez
@wordyallen
woah dude
Michael Karpinski
@karpimpski
@wordyallen @GregatGit both of those still give me the same error where my buttons animate at the same time
Joe Narvaez
@wordyallen
this.setState({hoverActive: true}) @jeremyroe
Jeremy Roe
@jeremyroe
Ah thanks @wordyallen I’ll give that a shot
CamperBot
@camperbot
jeremyroe sends brownie points to @wordyallen :sparkles: :thumbsup: :sparkles:
:warning: jeremyroe already gave wordyallen points
Joe Narvaez
@wordyallen
you never bind state props
Greg Duncan
@GregatGit
@karpimpski don't have it start on document ready
Michael Karpinski
@karpimpski
@GregatGit I took the call out of document ready, but my error's still here
Greg Duncan
@GregatGit
@karpimpski setTimout should only be in the loop
Joe Narvaez
@wordyallen
can someone help with my portfolio?
I'm thinking of adding a physics engine
Michael Karpinski
@karpimpski
@GregatGit it is, or at least I thought. how should I set my setTimeout?
Greg Duncan
@GregatGit
@karpimpski for now comment out out your math random and switch. Make up an array to test
so put a bunch of numbers in used
Jeremy Roe
@jeremyroe
I think a physics engine is probably beyond my abilities @wordyallen but I’m happy to give a hand if I’m able
Joe Narvaez
@wordyallen
@jeremyroe how'd it go?
with setState
Michael Karpinski
@karpimpski
@GregatGit just put red blue and yellow, all toggline continuously
Jeremy Roe
@jeremyroe
tinkering with a syntax error that arose after the change but I’m pretty sure that’s the right track @wordyallen
Joe Narvaez
@wordyallen
Greg Duncan
@GregatGit
@karpimpski something simply like var used = [0, 1, 2, 3, 2, 3, 1, 2, 0];
Michael Karpinski
@karpimpski
@GregatGit that wouldn't work because used has to contain colors, not numbers
@GregatGit the numbers are generated, that var is turned into a color, then pushed to the array
Jeremy Roe
@jeremyroe
very nice @wordyallen
Greg Duncan
@GregatGit
okay just put the colours in var used
Joe Narvaez
@wordyallen
super simple dude
Michael Karpinski
@karpimpski
@GregatGit yeah, that's what I did