This Dart 2 only, stable release of react includes:
Full React JS 16.x Component Lifecycle Support
The new Component2 class replaces the now deprecated Component class.
Faster
Initial renders ~10% faster
Re-renders ~7 - 30% faster
Improved developer experience
Props and state values now show up in the React DevTools just as they would if you were using React JS, and primitive values (strings, numbers, booleans) can be edited live, just like in React JS!
Easier to maintain
Easier integration with JS libs
ReactJsComponentFactoryProxy makes it easy to use JS components with Dart!
"Context provides a way to pass data through the component tree without having to pass props down manually at every level. … Context is primarily used when some data needs to be accessible by many components at different nesting levels. Apply it sparingly because it makes component reuse more difficult."
"A common pattern in React is for a component to return multiple elements. Fragments let you group a list of children without adding extra nodes to the DOM."
Component.render can now return Fragments (multiple children) or other values like strings and lists instead of just a single ReactElement
This Dart 2 only, stable release of react includes:
Full React JS 16.x Component Lifecycle Support
The new
Component2
class replaces the now deprecatedComponent
class.Faster
Initial renders ~10% faster
Re-renders ~7 - 30% faster
Improved developer experience
Easier to maintain
Easier integration with JS libs
ReactJsComponentFactoryProxy
makes it easy to use JS components with Dart!Supports new lifecycle methods, allowing us to use Concurrent Mode in the future
=>componentWillMount
componentDidMount
=>componentWillReceiveProps
getDerivedStateFromProps
(new)=>componentWillUpdate
getSnapshotBeforeUpdate
(new)componentDidCatch
/getDerivedStateFromError
(new)Portals
Improved, stable Context API
Fragments
New and improved ref API: React.createRef
React Redux is now included in the JS bundles and exposed via
window.ReactRedux
.No more Dart 1 SDK support