Facebook just announced the release of React v16.0.
New features
- fragments
- error boundaries
- portals
- custom DOM attributes
- improved server-side rendering
- small lib size
better render perf (with react-fiber)
12345678910111213https://github.com/facebook/react/issues/10686v15render functional component tree x 115,932 ops/sec ±4.10% (55 runs sampled)render class based component tree x 255,407 ops/sec ±4.46% (58 runs sampled)render class that renders functional components x 252,045 ops/sec ±5.47% (56 runs sampled)Fastest is render class based component tree,render class that renders functional componentsv16render functional component tree x 204,931 ops/sec ±2.21% (59 runs sampled)render class based component tree x 339,215 ops/sec ±2.98% (58 runs sampled)render class that renders functional components x 326,880 ops/sec ±4.51% (56 runs sampled)Fastest is render class based component tree,render class that renders functional components
Install
Just update your package.json
No other configurations, and no migration issues :D
(It’s true !!!!!)
|
|
Pratical performance (in chrome devtool)
v16
v15
You maybe also need to update (optional)
|
|