Тёмный

Attach functionality via LiveView's Lifecycle Hooks  

German Velasco
Подписаться 1,5 тыс.
Просмотров 731
50% 1

What do you do if you want to perform the same functionality across many LiveView actions? (events, messages, patches, etc.). We can use LiveView's lifecycle hooks to tap in to handle_event, handle_params, handle_info, and after_render stages.
For more videos like this, check out www.elixirstreams.com

Наука

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

 

14 дек 2023

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 6   
@flipperiflop
@flipperiflop 6 месяцев назад
These videos are great! The shortness makes it really easy to just get the info without any extra fluff. The audio levels seem a bit too low on my headphones, and the voice is not really there on the left side, although that might be an issue on my end.
@germanvelasco
@germanvelasco 6 месяцев назад
Thanks! I'm glad to hear you like them! And thanks for the audio feedback -- I'll look into that for sure.
@victorkarlsson5183
@victorkarlsson5183 24 дня назад
Your videos are amazing! I really had a hard time getting how this worked, but your video perfectly explained this. I've tried and reference the beats project for some navigation, but couldn't figure out how they handled the hooks, now it make sense! I'd love a video showing how to handle pubsub / events via hooks for navbars / notifications. keep up the good work :)
@germanvelasco
@germanvelasco 24 дня назад
Thanks for the kind words! Always good to hear that the videos are helping! 🙌 And thanks for the suggestions! I'll keep those in mind.
@abessesmahi4888
@abessesmahi4888 6 месяцев назад
Can i extract the authorization logic from the liveview handlers and put theme into central place like using Lifecycle Hooks? so that i keep handlers clean without the boilerplate of authorization codes... Thank you so much for your efforts.
@germanvelasco
@germanvelasco 6 месяцев назад
I think it depends on what your authorization logic looks like, but yeah, you should be able to! That's the beauty of the lifecycle hooks.
Далее
Learn React Hooks: useEffect - Simply Explained!
14:07
Просмотров 117 тыс.
My little bro is funny😁  @artur-boy
00:18
Просмотров 5 млн
Phoenix JS Hooks: LiveView is now even better!
15:05
Просмотров 4,3 тыс.
How you start writing LiveView
41:32
Просмотров 10 тыс.
Phoenix LiveView Hooks
6:38
Просмотров 1,3 тыс.
Minecraft Doesn't Get More Confusing
9:07
Просмотров 151 тыс.
The latest in Web UI (Google I/O ‘24)
45:47
Просмотров 168 тыс.
ДЕШЕВЫЙ НОУТБУК C OZON ЗА 17000р
13:00
Телефон в воде 🤯
0:28
Просмотров 1,2 млн