-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Usage with volt? #11
Comments
Hey Dean! Only reason I can think of is my limited knowledge 😄 But I do love the boldness and thinking out of the box ❤️ Is this something you would like to put your hands on and contribute? |
I had a play with this today - only gotchas so far is I still haven't got
vite playing ball perfectly (it's kinda working but breaks when I import
react components via js), and render on Volt/Component is `final`, so I
just removed the final blocker locally to see if it'd work and it looks
like it would 🤷♂️
On the upside vscode was happy to treat a script tag in a blade file as
typescript, so it looks like it'd be somewhat usable if it did work
…On Mon, 20 May 2024, 4:58 pm Joao Patricio, ***@***.***> wrote:
Hey Dean!
Only reason I can think of is my limited knowledge 😄
But I do love the boldness and thinking out of the box ❤️
Is this something you would like to put your hands on and contribute?
—
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAVFHPX5OWELQBATIJASO6TZDGNIHAVCNFSM6AAAAABH6XHNQWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJZG44TONZWGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
OK, I got this working; Source: https://github.com/deanmcpherson/react-in-livewire-example It essentially allows you to call E.g.
|
Hey @deanmcpherson This is AWESOME!! ❤️ I'm actually not a Volt user, but it does make all sense to also support it. I'm just a little swamped with tasks, but I'll take that repo for a spin, and hopefully I can understand enough to also support it - I've never done a Vite plugin. Thank you, I'll ping back soon |
Thanks! I think there's a few pieces in here, I'm not sure if mingle is even the right place the auto-extracting-inline-component voodoo I've got running On the simpler side, you can also just call |
I made it with Vuejs and everything works normal. I used Volt class based anonymous component and just put empty div inside blade directive. Something like this `use Ijpatricio\Mingle\Concerns\InteractsWithMingles;
} ` Now just typical blade
Use Vuejs component like you would normaly doThere is just small issue that you should handle. HasMingle trait doesnt have return type on render function like Volt has (mixed). Youll get and error but it is easy fix, just set return type. It would be good for author to do that. |
Hello everyone @deanmcpherson @cryptoforu This seemed perfectly doable, so I went ahead and added that return type To this day, I haven't used Volt 😅 Regular Livewire just hits me better, I guess I'm used to it over the years. So I could feel more confident, would it be possible to see a reproduction repo of this?
|
Like i said, class api works without problem with vuejs SFC. I even made it working with plugins, like VUE rtk query i vue laravel 18n. Sorry on my mobile now |
Just spitballing ideas here - but if there were a way to;
Then you could conceivably make a single file Livewire react/vue component that defines and exposes it's own API layer/data requirements
With folio this would be really similar to next/remix style page components
It'd be really cool to be able to write volt functions in single files regardless of whether they're Livewire/alpine/react/vue/whatever
Can you think of any reason this wouldn't work?
The text was updated successfully, but these errors were encountered: