Skip to content

Commit c5119ff

Browse files
Revert breaking change
1 parent d9129a3 commit c5119ff

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

lib/src/component/prop_mixins.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
/// Various prop related mixins to be used with `UiComponent` descendants.
1818
library over_react.prop_mixins;
1919

20-
import 'package:over_react/over_react.dart' show AriaPropsMapView, AriaPropsMixin, DomProps, PropsMeta, ReactNode;
20+
import 'package:over_react/over_react.dart' show AriaPropsMapView, AriaPropsMixin, DomProps, PropsMeta;
2121
// Must import these consts because they are used in the transformed code.
2222
// ignore: deprecated_member_use, unused_shown_name
2323
import 'package:over_react/over_react.dart' show PropDescriptor, ConsumedProps, PropsMeta;
@@ -46,10 +46,10 @@ abstract class _$ReactPropsMixin {
4646

4747
// This private field is namespaced to avoid colliding with other classes.
4848
@Accessor(key: 'children')
49-
ReactNode _raw$ReactProps$children;
49+
dynamic _raw$ReactProps$children;
5050

5151
/// The children that were passed in to this component when it was built.
52-
List<ReactNode>? get children {
52+
List<dynamic>? get children {
5353
final value = _raw$ReactProps$children;
5454

5555
// Most common case; Dart components should all have List children
@@ -68,7 +68,7 @@ abstract class _$ReactPropsMixin {
6868
return [value];
6969
}
7070

71-
set children(List<ReactNode>? value) => _raw$ReactProps$children = value;
71+
set children(List<dynamic>? value) => _raw$ReactProps$children = value;
7272

7373
/// A String that differentiates a component from its siblings.
7474
///

lib/src/component/prop_mixins.over_react.g.dart

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/over_react/component_declaration/component_base_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ main() {
498498
});
499499

500500
test('null: returns an empty list', () {
501-
expect(getTypedView({childrenKey: null}).children, same(const <ReactNode>[]));
501+
expect(getTypedView({childrenKey: null}).children, same(const []));
502502
});
503503

504504
test('a single child: wraps in a list', () {

0 commit comments

Comments
 (0)