react 4.8.1 react: ^4.8.1 copied to clipboard
Bindings of the ReactJS library for building interactive interfaces.
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!