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

bartblast
Hologram v0.8.0 is out! This release brings JavaScript interoperability - the most requested feature since the project’s inception. You c...
New
hugobarauna
This post announces the Livebook desktop app, a way to install Livebook on your machine without the requirement to have Elixir installed ...
New
bartblast
Hologram UI is in the works - the official component library for Hologram - and the waiting list is now open. A common reaction when I m...
New
zachdaniel
AshCloak AshCloak is small but mighty! Simply configure the extension, and it will encrypt your attributes :partying_face: Since an exam...
New
jjcarstens
Do you like Hacktoberfest? Also enjoy working with Nerves and want to contribute? Fantastic! :tada: :beers: Here are some potential sta...
New
zachdaniel
Hey folks! I’ve released the first version of our new AI policy. Accepting it is now part of our issue and pull request templates. Feel ...
New
zachdaniel
Just released: Ash AI, a new extension for Ash Framework. LLM integration for Elixir apps. Use Ash’s declarative approach for structured ...
New
fhunleth
We’ve released Nerves v1.3.0 with support for Elixir 1.7 and Distillery 2.0! We encountered a few bumps over the past week, but it’s look...
New
DominikWolek
Hi everyone! After about 3 months of really hard work, we have released the very first version of Jellyfish Media Server! The best star...
New
zachdaniel
Hello everyone! We’ve got two big updates on the Ash community today :tada: Discord Support Forum → Elixir Forum The Ash community is g...
New

Other popular topics Top

New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
AstonJ
Please see the new poll here: Which code editor or IDE do you use? (Poll) (2022 Edition) It’s been a while since we first asked this, I...
208 31142 143
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New

Latest on Elixir Forum

We're in Beta

About us Mission Statement