bartblast

bartblast

Creator of Hologram

Build in Public posts for Hologram

Hey folks,

I’ve started publishing Build in Public posts about Hologram, roughly 1-2 times a week. They cover the design thinking behind framework features as they happen: pivots, trade-offs, the messy middle of API design before things ship, and so on.

First one is up now about the realtime layer I’ve been working on the last few weeks.

If that’s the kind of thing you want to follow:

Most Liked

bartblast

bartblast

Creator of Hologram

No worries, good thing to ask!

Action dispatch from JS already works today via Hologram.dispatchAction("name", "target", params) - that’s the supported path. See the “Dispatching Actions from JavaScript” section in the docs: JavaScript Interop.

Calling arbitrary Elixir functions from hand-written JS (outside the action-handler model) isn’t planned though. Hologram doesn’t just transpile - it’s a full compiler. Among other things, it analyses the call graph at compile time and ships only the Elixir code each page actually needs (which is why Hologram bundles stay so small). A JS call site referencing an arbitrary Elixir function is opaque to that analysis, so the function (or its transitive deps) could get tree-shaken out of the bundle. Action dispatch sidesteps this because actions are first-class compile-time entry points the compiler already traces.

The reverse direction - Elixir → JS - is mature today via the Hologram.JS module: js_import, JS.call, JS.get, JS.new, the ~JS sigil, etc. (Same docs page covers both directions.)

hxgdzyuyi

hxgdzyuyi

cool :rocket::rocket::rocket:

DaAnalyst

DaAnalyst

Thank you!

Where Next?

Popular in News & Updates Top

fhunleth
We recently released Nerves 1.4.0 and an update to the Nerves new project generator, nerves_bootstrap. The biggest change is support for ...
New
fhunleth
We recently released Nerves 1.6 and corresponding updates to the Nerves new project generator, nerves_bootstrap and our official systems....
New
barnabasJ
You can now add subscriptions using the DSL. subscriptions do pubsub YourAppWeb.Endpoint subscribe :something_changed do action...
New
mat-hek
I’m thrilled to announce that for the first time, we’re organizing RTC.ON - the conference about Membrane and multimedia streaming :tada:...
New
zachdaniel
Join us for our first Ash Office Hours next Thursday at 6PM EST! Myself and anyone from the core team who can make it will be answering q...
New
hwuethrich
Hi! I’m happy to share my first Elixir library. But first some … Background As an Elixir company from a country with 4 official languag...
New
sorentwo
Oban.Web is a view of Oban’s inner workings that you host directly within your Phoenix application. Powered by Oban Metrics and Phoenix L...
New
zachdaniel
Ash and AshPostgres generators/installers, built with igniter are available on main! I’ll be very grateful to anyone willing to give the...
New
bartblast
Hey there! :slight_smile: We need help completing Elixir’s browser runtime by porting some Erlang functions to JavaScript. Hologram aut...
New
zachdaniel
Hey folks! I’ll be teasing some interesting bits going into Ash 3.0 while I work on it, and this is post #1! You can follow along with t...
New

Other popular topics Top

skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 39297 209
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 47930 226
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New

We're in Beta

About us Mission Statement