Skip to content

Bluetab/react_flow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ReactFlow

Igniter installer for Phoenix apps that adds:

  • live_react
  • @xyflow/react (React Flow)
  • Vite-based frontend scaffolding compatible with LiveReact
  • Example ReactFlowLive route rendering a graph component

Usage

Add the installer package to your Phoenix project and run:

mix igniter.install react_flow

Or, if the dependency is already present:

mix react_flow.install

What It Patches

  • mix.exs: adds {:live_react, "~> 1.1"} and updates assets.* aliases
  • config/dev.exs: adds :live_react dev config and npm watcher
  • config/prod.exs: adds :live_react prod config with SSR disabled by default
  • lib/<app>_web.ex: imports LiveReact in html_helpers/0
  • root.html.heex: wraps app assets with LiveReact.Reload.vite_assets
  • assets/: creates Vite + React Flow starter files
  • Router and LiveView: adds /react-flow and an example ReactFlowLive

After Running

Run:

mix deps.get
npm install --prefix assets

Then start your Phoenix server and open /react-flow.

About

An igniter installer for adding `live_react` and `react_flow` npm dependency to a Phoenix LiveView project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors