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

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
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
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews