roflbobl

roflbobl

Support `put_flash/3` with option for target pid

I recently created some live_components where I want to notify the users with put_flash/3 live I normally do in live_views. I know that live_components have their own flash assigns, but maybe add a way to target a process/live_view to send the put_flash message.

Currently I use the method from this blogpost which works. It seems like a pretty standard thing to do, when making components.

Maybe there is lots of use cases I havn’t thought through.

My suggestion is something like this with an optional option:

socket |> put_flash(:info, "My message", target: live_view_pid)

I hope it makes sense

Where Next?

Trending in Proposals: Ideas Top

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
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
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
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
type1fool
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
akoutmos
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New

We're in Beta

About us Mission Statement