-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Async setup possible? #24
Comments
Hi @khrise, maybe something like this
|
Hi @EranGrin,
I don't know how to add the The problem that this piece of code solves is described here: Vue Router 4: Route Params Not Available on Created/Setup Thank you! |
Hi @tbl0605, Could you please provide more details about your use case? It appears to be an edge case that the current plugin configuration does not support. Understanding your specific requirements better will help me assess the feasibility of incorporating this feature. Alternatively, you are welcome to contribute by opening a pull request for this feature. Thanks |
Hi @EranGrin,
I have a Vue application (that I would like to convert to a web component) that contains Without the
Frankly, I have no idea how to fix this in your code :/ Ideally there should be some asynchronous callback somewhere so I could do |
I was working on the async solution, but I noticed that for the query param it is not needed, meaning it seems to work without any changes. Could you please check? |
H @EranGrin, |
Great, I'm still planning to introduce the asnyc feature but I think that for your use case this isn't needed |
@khrise Is the asnyc feature still interesting to you? Would you be able to test it? |
Oh yes, and yes. EDIT: No, it does work, apparently. I had another call outside the promise lambda :/ |
@khrise if I understand you correctly, this solution does work, and we can close this ticket, right?
|
Yes, we can close this. |
I have worked on a solution that might give better support for async initialization which let one pass a promise to the plugin
but I am still not quite sure regarding this solution and the related use-cases |
That's pretty much what I had in mind in the first place. |
I'm also interested in async setup. My use case is that I might have multiple components on the same page but each component has different props and I need to use the props to get some configs from a server before i spin up the App.vue. So optimally I'd be able to get the props, do some async requests, and feed these results into the plugins install method before the app starts. |
In my original app, I have an async setup. Among other async stuff, a configuration is fetched from a remote server.
Is there a way to accomplish this with
vue-web-component-wrapper
? Basically, I'd like to be able to make "createApp" wait for an arbitrary (configurable) promise.Thanks!
The text was updated successfully, but these errors were encountered: