Skip to content

Commit e65c049

Browse files
Revert breaking changes
1 parent daed633 commit e65c049

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/src/component/ref_util.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ Ref<T?> createRef<T>() => react_interop.createRef();
212212
/// _$Foo2Config, // ignore: undefined_identifier
213213
/// );
214214
UiFactory<TProps> uiForwardRef<TProps extends bh.UiProps>(
215-
ReactNode Function(TProps props, dynamic ref) functionComponent, dynamic _config) {
215+
/*ReactNode*/ dynamic Function(TProps props, dynamic ref) functionComponent, dynamic _config) {
216216
ArgumentError.checkNotNull(_config, '_config');
217217

218218
if (_config is! UiFactoryConfig<TProps>) {
@@ -231,7 +231,7 @@ UiFactory<TProps> uiForwardRef<TProps extends bh.UiProps>(
231231
// this will be an empty string.
232232
final displayName = config.displayName ?? getFunctionName(functionComponent);
233233

234-
ReactNode _uiFunctionWrapper(JsBackedMap props, dynamic ref) {
234+
/*ReactNode*/ dynamic _uiFunctionWrapper(JsBackedMap props, dynamic ref) {
235235
return functionComponent(propsFactory!.jsMap(props), ref);
236236
}
237237

lib/src/component_declaration/function_component.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export 'component_type_checking.dart'
9696
/// Learn more: <https://reactjs.org/docs/components-and-props.html#function-and-class-components>.
9797
// TODO: right now only top level factory declarations will generate props configs.
9898
UiFactory<TProps> uiFunction<TProps extends UiProps>(
99-
ReactNode Function(TProps props) functionComponent,
99+
/*ReactNode*/ dynamic Function(TProps props) functionComponent,
100100
dynamic _config,
101101
) {
102102
ArgumentError.checkNotNull(_config, '_config');

test/over_react/component_declaration/non_null_safe_builder_integration_tests/new_boilerplate/function_component_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ main() {
143143
GenericUiProps props;
144144

145145
setUp(() {
146-
final genericFactory = uiFunction<UiProps>((_) { return null; }, UiFactoryConfig());
146+
final genericFactory = uiFunction<UiProps>((_) {}, UiFactoryConfig());
147147
final factoryProps = genericFactory();
148148
expect(factoryProps, isA<GenericUiProps>(), reason: 'test setup check');
149149
props = factoryProps as GenericUiProps;

0 commit comments

Comments
 (0)