PhoenixLiveReact - Use react components to your phoenix live views

PhoenixLiveReact (Docs)

Small package to use React.js components in your phoenix live views.

def render(assigns) do
  ~L"""
  <%= live_react_component("Components.MyComponent", %{name: @name}) %>
  """
end

Uses hooks to update the rendered react component with new props on updates.

Might be useful for more complex javascript interactions like drag and drop or to use existing React components.

11 Likes

Cool solution for when you need to use existing react component

2 Likes