-
-
Notifications
You must be signed in to change notification settings - Fork 328
Why check parent element import source match child's import source #1192
-
When I use web.module_from_url to load two js module, but I cannot use two component at the same time. It will cause error blew.
bundle.min.js:4 Parent element import source {"source":"/static/bundle.min.js","sourceType":"URL"} does not match child's import source {"source":"/static/bundle02.min.js","sourceType":"URL"}
So I saw source code, then I found createImportSourceElement func in reactpy-vdom.tsx.
if (
!isImportSourceEqual(props.currentImportSource, props.model.importSource)
) {
console.error(
"Parent element import source " +
stringifyImportSource(props.currentImportSource) +
" does not match child's import source " +
stringifyImportSource(props.model.importSource),
);
return null;
}
I do not know why check this?
Beta Was this translation helpful? Give feedback.
All reactions
We currently do not support mix-and-matching components from different import sources. Some changes will be needed to support this safely. This feature will come in a future update.
- See #1262
Replies: 1 comment
-
We currently do not support mix-and-matching components from different import sources. Some changes will be needed to support this safely. This feature will come in a future update.
Beta Was this translation helpful? Give feedback.