This an example of how to get Phoenix and Reaxt to work together. Is based on the original reaxt-example
Test it now (need npm and elixir):
git clone https://github.com/ingerslevio/reaxt-phoenix-example.git
cd reaxt-example
mix deps.get
mix phoenix.server
Then:
- go to http://localhost:4000 to see an example application,
- you can test hot loading by changing a react template in
web/components/xx
, or the css inweb/css/index.css
. - you can see the webpack UI in http://localhost:4000/webpack
- you can test the javascript exception converted into elixir in http://localhost:4000/with_stacktrace
- then just analyse and understand the
reaxt
usage
- Use
Plug.Static
andWebPack.Plug.Static
instead of the temporary createdWebpackController
.