News for hackers. Stuff that matters.
Re:React JS Best Practices by STRML on Saturday May 09, 2015 @11:16AM (#9516591)
This is the right answer. This will effectively keep React from touching the element ever again after the initial render.
Re:React JS Best Practices by talldan on Sunday May 10, 2015 @01:18PM (#9520566)
I'm intrigued as to why you think this approach is better than using a key? The 'shouldComponentUpdate' way of doing things means any changes to props or state on the component have to be handled manually, which can introduce a lot of non-trivial and overly complex code.