-
Notifications
You must be signed in to change notification settings - Fork 58
Description
I suppose a followup question is: does the OverReact team plan to follow this migration guide to move away from
dart:htmlusepackage:web(anddart:js_interop) instead? https://dart.dev/interop/js-interop/package-webI'm not sure if there's an advantage to doing this as long as
dart:htmlis supported, but I notice their first justification for migrating is compatibility with WASM, which might meanpackage:webis more efficient? (or ultimately will be more efficient?)
Originally posted by @dave-doty in #947
On the same project, we are now migrating to package:web. OverReact's functions ask for dart:html types. For example, the function
react_dom.render() in the following code snippet:
react_dom.render(
over_react_components.ErrorBoundary()(
(ReduxProvider()..store = app.store)(
set_side_menu_props(ConnectedSideMenu(), state)(),
),
),
document.querySelector('#$SIDE_VIEW_MENU_ID')!,
);
throws the following error:
The argument type 'Element (where Element is defined in C:\Users\__\AppData\Local\Pub\Cache\hosted\pub.dev\web-1.1.1\lib\src\dom\dom.dart)' can't be assigned to the parameter type 'Element (where Element is defined in C:\tools\dart-sdk\lib\html\dart2js\html_dart2js.dart)'. dart[argument_type_not_assignable](https://dart.dev/diagnostics/argument_type_not_assignable)
dom.dart(3047, 16): Element is defined in C:\Users\__\AppData\Local\Pub\Cache\hosted\pub.dev\web-1.1.1\lib\src\dom\dom.dart
html_dart2js.dart(13159, 7): Element is defined in C:\tools\dart-sdk\lib\html\dart2js\html_dart2js.dart
This is likely because OverReact has not migrated to package:web. Would love to hear if there are any plans to support package:web interop, or any recommendations for teams navigating this migration.