kraleppa

kraleppa

Hey all

Currently, attach_hook/4 in LiveComponents supports only :handle_event and :after_render stages. HexDocs

I’m wondering if it would be possible to support all the rest (like update/2 or handle_async/3) of the LiveComponent lifecycle stages?

Is there a specific reason (technical or design) why LiveComponents are restricted to just those two hook stages?

Thanks!

Showing Posts 1 to 1

steffend

steffend

Phoenix Core Team

I don’t think there’s a technical reason blocking it. Adding support for handle_async might be as easy as adding it in line 98 here:

https://github.com/phoenixframework/phoenix_live_view/blob/ecb987460da52cd6f9301558ac22b52d68f44666/lib/phoenix_live_view/lifecycle.ex#L98

For update, more changes would be necessary, but if you want to look into it, a PR is welcome (I’d probably split it into two separate PRs though!).

— All posts loaded —

Where Next? Top

Trending in Proposals: Ideas Top

woylie
We are seeing a lot of warning logs like this: navigate event to "https://someurl" failed because you are redirecting across live_sessio...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews