Closed northkode closed 4 years ago
Hi @northkode, the single-spa core team (5 people) maintain this project. As you can see in the git history, we haven't updated this project in a couple years. But it was working then when we worked on it then.
We'd be happy to fix any issues you find with it, and also add any features that are missing. To pass data to the initialized component, you can use the data
property (and also maybe the props
property):
const lifecycles = singleSpaSvelte({
component: MySvelteComponent,
data: {
foo: 'bar'
}
})
^ Are you referring to something different than this in your question? There is also the possibility of using single-spa props. They are not yet implemented in single-spa-svelte, but we could add them if they'd be helpful to you.
Hey Joel, Yes sorry, I'm referring to the spa props based on outside lifecycle hooks. If those could be added to this for support that would be fantastic 👍🏻
I'm slowing integrating this as a way to move forward with a massive application I'm writing as I see the value of the import maps for dynamic publishing of certain parts of the app.
Thanks for your help!
See #6 which will resolve this
Thanks ill take a look!
Is there a way to call navigateToUrl
with props that inject into that component? it seems sometimes you want runtime props based on user interaction instead of inside pub/sub or dispatchers?
@joeldenning am i missing something, i can't find the documentation for how to use single-spa props and how that actually gets passed down into my bundle? the documentation isn't overly clear or I can't seem to find it.
single-spa-svelte@2.0.0 is published with support for single-spa props, making domElementGetter optional, and support with latest versions of svelte. https://github.com/single-spa/single-spa-svelte/releases/tag/v2.0.0
Thanks @joeldenning
i can't find the documentation for how to use single-spa props and how that actually gets passed down into my bundle? the documentation isn't overly clear or I can't seem to find it.
This is a feature I implemented yesterday, which is why it was not in the documentation. I've added it to the documentation in https://github.com/single-spa/single-spa.js.org/pull/190.
@joeldenning perfect. Thank you!
Is there active development on this?
How does one use this to pass data to initialized component dynamically? etc?