Drab 0.5.0 released, introducing living assigns in Phoenix templates
Drab is not jQuery dependent anymore, and allows to update the assign value by pushing it to the browser(s) from the server, live, without re-rendering the page.
Client:
<a href="https://<%= @url%>" @style.backgroundColor=<%= @color%>>
<%= @url %>
</a>
Immediate change color and url on the server side:
iex> poke socket, url: "tg.pl/drab", color: "red"
Read next Benchmarking and profiling Elixir apps