Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Elixir
  3. react_phoenix

react_phoenix

MITElixirv1.3.1

A thin wrapper to render React components in Phoenix templates with minimal setup.

Visit WebsiteGitHubGitHub
508 stars40 forks0 contributors

What is react_phoenix?

ReactPhoenix is a lightweight Elixir package that provides helper functions to integrate React.js components into Phoenix web application views. It simplifies embedding React within a Phoenix project using the default Webpack setup, avoiding the need to switch to a different frontend system. The package focuses on client-side rendering with minimal configuration.

Target Audience

Phoenix developers who want to incorporate React components into their Elixir-based web applications without overhauling their existing asset pipeline. It is particularly suited for teams using Phoenix's default Webpack configuration and seeking a straightforward way to add interactive React elements.

Value Proposition

Developers choose ReactPhoenix because it offers a pragmatic, low-configuration bridge between Phoenix and React, leveraging the existing Webpack setup to avoid complex frontend migrations. Its unique selling point is the seamless integration via a simple `react_component` helper, reducing setup time compared to alternative systems.

Overview

Make rendering React.js components in Phoenix easy

Use Cases

Best For

  • Adding interactive React components to existing Phoenix applications without switching frontend frameworks.
  • Phoenix projects using Webpack for asset management that need to embed React components in server-rendered templates.
  • Teams wanting to incrementally adopt React within a Phoenix codebase with minimal configuration overhead.
  • Developers seeking a lightweight solution for client-side React rendering in Phoenix views via a global namespace.
  • Integrating React into Phoenix 1.4+ applications that default to Webpack, avoiding Brunch-specific setups.
  • Scenarios where passing props and specifying target HTML elements for React component placement is required.

Not Ideal For

  • Projects requiring server-side rendering for SEO or fast initial page loads, as ReactPhoenix only supports client-side rendering.
  • Teams using Phoenix 1.3 or earlier with Brunch for asset compilation, since setup differs and requires referencing a separate guide.
  • Applications aiming to build a full single-page application (SPA) with complex React state management, as it's optimized for embedding components in server-rendered templates.

Pros & Cons

Pros

Easy Integration

The README emphasizes a quick installation process in 4-5 steps, with minimal configuration needed to start rendering React components in Phoenix views.

Webpack Compatibility

Designed to work with Phoenix's default Webpack asset pipeline, avoiding the need to switch frontend systems, as stated in the project description.

Helper Function Simplicity

Provides a react_component helper that supports props and target IDs, simplifying component rendering in templates, as shown in the usage examples.

Global Namespace Support

Allows mounting React components exposed on the window object, enabling straightforward access from Phoenix views, demonstrated in the setup instructions.

Cons

No Server-Side Rendering

The README admits server-side rendering hasn't been implemented, limiting use cases where SEO or performance optimization through SSR is critical.

Configuration Overhead

Setup requires extra Webpack configuration for npm users and Babel presets, which can be error-prone and adds complexity, as noted in the installation steps.

Global Namespace Dependency

Forces components into the global scope, which can lead to naming conflicts and less modular code, a constraint highlighted in the usage section.

Frequently Asked Questions

Quick Stats

Stars508
Forks40
Contributors0
Open Issues0
Last commit4 months ago
CreatedSince 2017

Tags

#elixir-lang#elixir#phoenix#phoenix-framework#client-side-rendering#javascript#frontend-integration#react#hex-package#reactjs#webpack

Built With

R
React
B
Babel
J
JavaScript
E
Elixir
P
Phoenix
W
Webpack

Links & Resources

Website

Included in

Elixir13.1k
Auto-fetched 9 hours ago

Related Projects

plugplug

Compose web applications with functions

Stars3,016
Forks610
Last commit5 days ago
surfacesurface

A server-side rendering component library for Phoenix

Stars2,135
Forks146
Last commit5 months ago
commandedcommanded

Use Commanded to build Elixir CQRS/ES applications

Stars2,030
Forks256
Last commit1 month ago
ex_adminex_admin

ExAdmin is an auto administration package for Elixir and the Phoenix Framework

Stars1,197
Forks264
Last commit6 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub