News for hackers. Stuff that matters.
Re:Flux Application Architecture by wingspan on Friday May 09, 2014 @12:22PM (#7721686)
No! Never access the DOM directly if you can help it. I forgot to mention, display things like you said are one of the only places we really use local state. A dropdown for instance, might have a state called "isOpen". In your click handler, you'd call this.setState({isOpen: true}), and in render, you'd only render the dropdown if isOpen is true.
Re:Flux Application Architecture by terhechte on Saturday May 10, 2014 @06:24AM (#7725006)
Thanks, totally makes sense now that I think about it. I just removed the offending code and set up a proper local state for it.