react 5.2.0 react: ^5.2.0 copied to clipboard
Bindings of the ReactJS library for building interactive interfaces.
5.2.0 #
- Expose
componentZone
to allow overriding the zone in which Component2 lifecycle methods are run, for testing
5.1.1 #
- Improve the documentation for deprecated
Component2
lifecycle methods.
5.1.0 #
Full ReactJS 16.x Component Lifecycle Support
- The new
Component2
class replaces the now deprecatedComponent
class.- Faster
- Improved dev 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)- Adds support for error boundaries.
- "Portals provide a first-class way to render children into a DOM node that exists outside the DOM hierarchy of the parent component."
Improved, stable Context API
- "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
New and improved ref API: React.createRef
React Redux is now included in the JS bundles and exposed via window.ReactRedux
.
5.0.1 #
Pull in 4.9.2 changes that were accidentally reverted as part of 5.0.0.
- #220 Fix bug where reading
dataTransfer
sometimes threw during synthetic event conversion
5.0.0 #
ReactJS 16.x Support
- The underlying
.js
files provided by this package are now ReactJS version 16. - Support for the new / updated lifecycle methods from ReactJS 16 will be released in version
5.1.0
.
4.9.2 #
- #220 Fix bug where reading
dataTransfer
sometimes threw during synthetic event conversion
4.9.1 #
- #205 Fix
context
setter typing to match getter and not failimplicit_casts: false
4.9.0 #
4.8.1 #
- #197 Fix Dart component callback refs with typed arguments not working in Dart 2
dynamic ref argument (worked):
non-dynamic ref argument (did not work):Foo({'ref': (ref) => _fooRef = ref})
Foo({'ref': (FooComponent ref) => _fooRef = ref})
4.8.0 #
- #181: Remove unnecessary zoning on event handlers that interferes with testing
-
Handlers triggered by real events will now always be called in the root zone.
In most cases, handlers were already running in the root zone, so this should not affect behavior. See #179 for more details.
-
When testing, you previous had to bind event handlers or callbacks triggered by event handlers to zones when using
expect
orexpectAsync
.var renderedInstance = renderIntoDocument( Button({}, { 'onButtonPress': Zone.current.bindUnaryCallback(expectAsync((e) { // ... }, reason: 'onButtonPress not called')), 'onClick': Zone.current.bindUnaryCallback((e) { expect(e.defaultPrevented, isTrue); }), }), ); // ... Simulate.click(buttonNode);
Now, handlers will be called in the zone they're triggered from, which makes testing events easier and more predictable:
var renderedInstance = renderIntoDocument( Button({}, { 'onButtonPress': expectAsync((e) { // ... }, reason: 'onButtonPress not called'), 'onClick': (e) { expect(e.defaultPrevented, isTrue); }, }), ); // ... Simulate.click(buttonNode);
-
4.7.1 #
- #182: Deprecate
emptyJsMap
:- Use
newObject()
fromdart:js_util
instead
- Use
4.7.0 #
- #162: Add
jsifyAndAllowInterop
, deprecate some obsolete JS utils:- Deprecate
jsify
,setProperty
, andgetProperty
; use versions fromdart:js_util
instead - Deprecate
EmptyObject
; usenewObject
fromdart:js_util
instead
- Deprecate
- #170: Reformat with line length of 120 for better readability
4.6.2 #
-
#162: Important Deprecations
These deprecations are being put in place to prepare consumers for the upcoming
5.0.0
release which will include support for React JS version 16.xreact_server.dart
and Dart VM server-side rendering- Server-side rendering via
react_dom_server.dart
, though untested, is still in place
- Server-side rendering via
- Legacy
context
APIs isMounted
react_test_utils.SimulateNative
- String
Component.ref
s Component.replaceState
sComponent.bind
Component.transferComponentState
-
#155: Clean the lint trap.
4.6.1 #
- #159: Update the type for unconverted js
style
prop map to beMap<String, dynamic>
.
4.6.0 #
4.5.0 #
- Improvement: Dart 2 compatible!