Тёмный

Optimistic UI but in Laravel Livewire 

Josh Cirre
Подписаться 10 тыс.
Просмотров 3,9 тыс.
50% 1

Опубликовано:

 

30 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 27   
@joshcirre
@joshcirre 5 месяцев назад
I didn't explain into detail what's happening with the wire:loading.remove directive with the target of "completeTodo" but that's where the optimistic UI for completing todos comes in. While that method is loading in the round trip to the server, we are removing that todo from the page. It still works fantastic if there are any errors that pop up because it's only removed while "loading."
@villarmaryan6577
@villarmaryan6577 5 месяцев назад
maybe for resetting the variable, using $this->reset() or using alpine x-on:keyup.enter="$wire.variable = ' ' " ? correct me if im wrong.
@joshcirre
@joshcirre 5 месяцев назад
I believe this is what Caleb revealed as the way he cleared the value (the x-keyup way, but with x-on:submit) The $this->reset() still has to wait for the server to respond. ☺️
@kwyaza
@kwyaza 5 месяцев назад
Livewire is okay for small projects. When you need to do anything complex, it becomes painful to work with. Rather use Alpine or HTMX or a React. Intertia also looks interesting.
@joshcirre
@joshcirre 5 месяцев назад
I would argue that this is false nowadays. With Livewire v3, especially, it is more stable and feature complete now more than ever. Especially with things like wire:navigate, teleport, and persist. There's very little you can do with React w/ Inertia that you can do with Livewire. Alpine is perfect (and in this example we are using Alpine for the text display) for client side interactions, and I would say Livewire is the Laravel-optimized version of HTMX. The only reason I would opt for Vue or React w/ Inertia is if I was specifically hiring and I wanted library specific devs. Otherwise, a great solution for reaching for the former would be for a specific library that you're looking to use (Tremor with React is a perfect example). However, even that last point is slowly becoming moot. There is a package called MingleJS for Livewire that allows you to embed React or Vue components in a Livewire project. It helps solve for those times when you do need to reach for something a little "more".
@antoniedik
@antoniedik 5 месяцев назад
Can you create a tutorial on installing WireUi?
@navinyadav7973
@navinyadav7973 5 месяцев назад
In fact you don't have to use internet 😂😂😂 Just kidding
@joshcirre
@joshcirre 5 месяцев назад
I wish. 😅 But there’s some cool things being done with offline-first Laravel things with Replicache. 👀
@mrdarknezz
@mrdarknezz 5 месяцев назад
Thanks I had the same exact thought when I saw the demo
@joshcirre
@joshcirre 5 месяцев назад
I blame Caleb for making me using my brain to figure it out. 😁
@ltroya
@ltroya 5 месяцев назад
Nice video! Can you please share what font and phpstorm theme you are using? It looks so clean
@brunocmesquita
@brunocmesquita 5 месяцев назад
Font looks like Dank Mono, and vscode theme looks either Catppuccin Mocha or Catppuccin Noctis Mocha.
@joshcirre
@joshcirre 5 месяцев назад
Bruno nailed it on the head (well almost). This is Catppuccin Machiato. With sideBar.background, sideBarSectionHeader.background, and sideBar.border altered. Then a bunch of other APC hacks based on Caleb Porzio's VS Code course. So, not PHPStorm unfortunately. 😅
@brunocmesquita
@brunocmesquita 5 месяцев назад
@@joshcirre Very good. I must say I also based my current config on Caleb's gist.
@NateNz-t1s
@NateNz-t1s 5 месяцев назад
Thank you, this is great..
@joshcirre
@joshcirre 5 месяцев назад
Glad it could be useful! I think it’s pretty nifty! ☺️
@abdiabdirizak
@abdiabdirizak 5 месяцев назад
Hey Josh, clean audio as usual. Can you please do a tutorial on Livewire and wireui. Just a simple appl to get started from scratch, especially the authentication?. Great video tho.
@joshcirre
@joshcirre 5 месяцев назад
Sure thing! I have a 3+ Hour long tutorial where we build a full application in Livewire and WireUI or are you looking for a quicker video?
@abdiabdirizak
@abdiabdirizak 5 месяцев назад
@@joshcirre yah something without using any starter kit. From scratch just the app layout and the auth.
@joshcirre
@joshcirre 5 месяцев назад
@@abdiabdirizak makes sense! I would say implementing auth without a starter kit is more work than it needs to be. Using a starter kit is 100% a better solution. ☺️
@abdiabdirizak
@abdiabdirizak 5 месяцев назад
@@joshcirre 😅😅 I agree.
@Stoney_Eagle
@Stoney_Eagle 5 месяцев назад
You sell it like it's a fairytale hehe, Laravel and Livewire are surely amazing. Too bad I still can't use it😢
@joshcirre
@joshcirre 5 месяцев назад
Did you see that the back “null” issues got fixed? github.com/livewire/livewire/pull/7895 Any other blockers?
@Stoney_Eagle
@Stoney_Eagle 5 месяцев назад
@@joshcirre The documentation site still has that bug, I'll check out the PR.
@joshcirre
@joshcirre 5 месяцев назад
I need to dig in more myself! I know that release is relatively new so might not be fully pushed out just yet!
@Stoney_Eagle
@Stoney_Eagle 5 месяцев назад
@@joshcirre I should be working on my main domain but the only 2 options that serve my needs are Vue or Livewire and even tho I love Vue, I really want Livewire. It is such an amazing DX, but I can't sell my users "NULL". I'll give the PR a go tomorrow and see if I can still reproduce the bug or not, I'll let you know. Also... when are you streaming again mate 😋
@Stoney_Eagle
@Stoney_Eagle 5 месяцев назад
@@joshcirre OMG IT'S FIXED!!!! LETS GOOOOO i can finally work on my main website now 🥳
Далее
The Tools I Use to Build Products in Laravel
19:00
Просмотров 31 тыс.
Bearwolf - GODZILLA Пародия Beatrise
00:33
Просмотров 299 тыс.
ТАРАКАН
00:38
Просмотров 1,3 млн
Is Laravel Livewire actually secure?
8:19
Просмотров 9 тыс.
Why is Laravel NOT used in Big Development Projects?
11:53
Laravel Livewire: Real Projects
5:09
Просмотров 3 тыс.
Which Livewire method should I use?
8:20
Просмотров 6 тыс.
You should just choose Laravel
13:23
Просмотров 33 тыс.
PHP on the frontend! No more Javascript!
14:47
Просмотров 123 тыс.
Laravel + Livewire todo app (and so much more)
16:41
Просмотров 45 тыс.
Even MORE Livewire and Alpine Optimistic UI Tips
35:43
Просмотров 2,1 тыс.
The Home Server I've Been Wanting
18:14
Просмотров 174 тыс.
Bearwolf - GODZILLA Пародия Beatrise
00:33
Просмотров 299 тыс.