I'm working on a micro services frontend platform, where the main app is built in React and there are multiple widgets, each with its own route. All widgets are so far in React, but I would like to be able to include Svelte widgets too.
Just rendering a Svelte package into React is not a problem, following this setup:
If this lazy imported component is of type React, it's not a problem, but if it's a Svelte type, passing this component to the SvelteWrapper function fails -- I believe because it's still a promise -- and the console error is:
Describe the proposed solution
Easier mechanism to assimilate Svelte components into React or Vue applications, allowing it to work with lazy loading.
Describe the problem
Hi,
I'm working on a micro services frontend platform, where the main app is built in React and there are multiple widgets, each with its own route. All widgets are so far in React, but I would like to be able to include Svelte widgets too.
Just rendering a Svelte package into React is not a problem, following this setup:
However, part of the architecture is to lazy load all widgets as follows:
If this lazy imported component is of type React, it's not a problem, but if it's a Svelte type, passing this component to the
SvelteWrapper
function fails -- I believe because it's still a promise -- and the console error is:Describe the proposed solution
Easier mechanism to assimilate Svelte components into React or Vue applications, allowing it to work with lazy loading.
Alternatives considered
I created a lazyloader wrapper but to no avail:
Importance
nice to have