Skip to content
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

Cannot make Mingle Livewire Components Lazy #25

Open
andruu opened this issue Aug 25, 2024 · 2 comments
Open

Cannot make Mingle Livewire Components Lazy #25

andruu opened this issue Aug 25, 2024 · 2 comments

Comments

@andruu
Copy link

andruu commented Aug 25, 2024

CleanShot 2024-08-25 at 10 48 53@2x

Getting these errors when trying to make a mingle component lazy.

<livewire:component-name :lazy="true"/>
@mrfelipemartins
Copy link

I encountered this issue before, but since I didn't have much time to spend on it I realized that making my component lazy wasn’t necessary. Since Mingle boots the React component, I could “lazy load” the data by simply calling the desired method from React using props.wire.method();

@ijpatricio
Copy link
Owner

Hello @andruu and @mrfelipemartins

Yeah, the Lazy part of not delaying the load can be solved by getting data from $wire.

Something algo good to have is a "placeholder" while the component is loading...

In this gif, you can see me refreshing the page (cmd+r), and I get a temporary component - like in Livewire

Warning

I've done this just in local code. Still not published. I now need to clean things and next few day's I'll ship it!

CleanShot 2024-11-18 at 02 09 49

CleanShot 2024-11-18 at 02 12 24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants