• Vjeux's avatar
    React - Improve performance by 6x · d456aeb1
    Vjeux authored
     - 2x: The unminified version contains invariants that shouldn't be used in production and slow it down.
    
     - 3x: Adding a shouldComponentUpdate override in order to short-cut re-rendering the component when props and state didn't change. In order to do that, we need to avoid doing mutations by doing a shallow copy and only modifying what changed
    
     - When React 0.5.0 will be released, it will give another 1.5x.
    
    Other miscellaneous changes:
    
     - Update class="..." to className="..." to work in 0.5.0 (still works in 0.4.1)
     - Use prop="..." instead of prop='...'
     - Use filter(f, this) instead of filter(f.bind(this)) to prevent a function allocaton
    d456aeb1
todoItem.jsx 2.44 KB