Fortune
ArgumentError when using live component * 1st argument: not an atom
I have been trying to render a live component, like this as in the docs:
<h1>Home</h1>
<p>Welcome to the home page</p>
<.live_component module={CellitWeb.HomeHeroComponent} id="home" />
</div>```
I keep on getting this error however:
```** (exit) an exception was raised:
** (ArgumentError) errors were found at the given arguments:
* 1st argument: not an atom
:erlang.apply(%{__changed__: nil, id: "home", module: CellitWeb.HomeHeroComponent}, :__live__, [])```
Whenever I remove this line:
``` <.live_component module={CellitWeb.HomeHeroComponent} id="home" />
the error is no more, I am not sure why the error is there and I’d like some help and insight on this.
Marked As Solved
Fortune
Thank you for your response, I have however found after countless of hours of debugging that the problem lies in how I define and render with my Phoenix Liveview version 0.16.0 and how I should define the live component using
use Phoenix.Component and render it as <%= live_component HeroComponent, id: :hero, content: @content %>.
Popular in Questions
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
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
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
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors:
[WARN] - (starship::utils): Executing command ...
New
Hey,
Just curious what are the main benefits of Elixir compared to Clojure?
When is Elixir more useful than Clojure and vice versa?
Th...
New
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
Hi!
In PHP: $SERVER['SERVERADDR'] - in Elixir?
Searched the docs for ip address and the web, no good results.
Thanks!
New
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar.
I p...
New
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
Hi! May someone helps me, please!
I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
Other popular topics
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
New
Hello, how can I check the Phoenix version ?
Thanks !
New
Hi folks,
Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
New
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar.
I p...
New
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
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
Hi everyone!
I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New







