These are chat archives for reflux/refluxjs

9th
Dec 2015
Parth Patel
@psyrotix
Dec 09 2015 22:18
Hey guys
im new to reflux/reactjs coming from angular js and im having a hard time
I was wondering what are the best resources to learn reflux/reactjs
Joe
@PenguinMan98
Dec 09 2015 22:19
I use a udemy course
Parth Patel
@psyrotix
Dec 09 2015 22:19
does that include reflux?
Joe
@PenguinMan98
Dec 09 2015 22:19
yep
Parth Patel
@psyrotix
Dec 09 2015 22:19
wow
perfect
thanks
Joe
@PenguinMan98
Dec 09 2015 22:20
And it's on sale for only $15 for the next 24 horus or so
not that I'm affiliated with udemy in any way shape or form
Parth Patel
@psyrotix
Dec 09 2015 23:03
not for me
Joe
@PenguinMan98
Dec 09 2015 23:05
shrugs
what are your questions?
I'm still learning myself but I'll try to answer
Parth Patel
@psyrotix
Dec 09 2015 23:42
im trying to make a quiz app
using reflu
and i dont know how to make it change the dom element on button press
to the next quiz in the quiz array
I actually just have a general lack of understanding as to how to make actions happen when dom elements are clicked and stuff like that
Joe
@PenguinMan98
Dec 09 2015 23:50
ok
In the standard model for a react class, you have a render method. Behind the scenes there is an object called this.state. Any time this.state is changed, all the render functions are re-run. In this render function you can tell it to hide one thing and show another based on the values inside the this.state
So you will create listeners to listen for button clicks and use those to change the this.state and that triggers the re-rendering
Joe
@PenguinMan98
Dec 09 2015 23:58
If you want the clicking to mimick page changes then it's a bit more complicated but that's a simplified top-level understanding of the mechanism