Phoenix Reactify

Phoenix Reactify is an amazing mix task capable of adding a simple React implementation to your fresh phoenix projects.

WARNING: Currently, because of some webpack version related issues, this library its only compatible with Phoenix 1.5.9 or any other that have webpack ~4.5 as peer-dependency.

How does PhoenixReactify works?

It uses the amazing remount library to make your entire SPA App into a html tag, so that you can use into your phoenix application's templates

Installation

My first idea was to release it as a mix archive, so that you could use it in any project, once installed, just like mix phx.new command. But since mix archives cannot bundle dependencies (and this project has), I had to release it in two different ways:

def deps do
[
# other dependencies
{:phoenix_reactify, "~> 0.0.2"}
]
end

Feel free to remove it from the dependencies once you've set up your project 😄

$ ./phoenix_reactify

Usage

At this moment, Phoenix Reactify supports these options:

mix phx.reactify --typescript --project <PROJECT-NAME> --verbose

After all set, you can embbed your spa, as <x-YOUR-PROJECT-NAME > onto any of your .html.eex files.

WARNING: be careful with route conflicts between the applications

ToDo

License

MIT