<commit_before># ReactPhoenix

[![Build Status](https://travis-ci.org/geolessel/react-phoenix.svg?branch=master)](https://travis-ci.org/geolessel/react-phoenix)

Functions to make rendering React.js components easy in Phoenix.

Combined with the javascript also included in this package, rendering React
components in your Phoenix views is now much easier. The module was built
with Brunch in mind (vs Webpack). Since Phoenix uses Brunch by default, this
package can make getting React into your application much faster than
switching over to a different system.

Beyond just rendering your React.js components on the client-side, you
can also optionally enable server-side rendering. This allows you to
render all the React components in your controller and output the
resulting html on initial page load (which can help with things like
search engine optimization).


## Installation in 3 (or 4 [or 5]) EASY STEPS!

This package is meant to be quick and painless to install into your Phoenix
application. It is assumed that you have already brought React into your
application through `npm`.

> Would you rather watch a video? Watch me set it all up from `mix phoenix.new` to rendering
> a React component in 4 minutes [here](https://youtu.be/icwjAbck8yk).

### 1. Declare the dependency

The package can be installed by adding `react_phoenix` to your list of
dependencies in `mix.exs`:

```elixir
def deps do
  [{:react_phoenix, "~> 0.3.0"}]
end
```

After adding to your mix file, run:

```
> mix deps.get<commit_msg>Bump deps version in README.md<commit_after># ReactPhoenix

[![Build Status](https://travis-ci.org/geolessel/react-phoenix.svg?branch=master)](https://travis-ci.org/geolessel/react-phoenix)

Functions to make rendering React.js components easy in Phoenix.

Combined with the javascript also included in this package, rendering React
components in your Phoenix views is now much easier. The module was built
with Brunch in mind (vs Webpack). Since Phoenix uses Brunch by default, this
package can make getting React into your application much faster than
switching over to a different system.

Beyond just rendering your React.js components on the client-side, you
can also optionally enable server-side rendering. This allows you to
render all the React components in your controller and output the
resulting html on initial page load (which can help with things like
search engine optimization).


## Installation in 3 (or 4 [or 5]) EASY STEPS!

This package is meant to be quick and painless to install into your Phoenix
application. It is assumed that you have already brought React into your
application through `npm`.

> Would you rather watch a video? Watch me set it all up from `mix phoenix.new` to rendering
> a React component in 4 minutes [here](https://youtu.be/icwjAbck8yk).

### 1. Declare the dependency

The package can be installed by adding `react_phoenix` to your list of
dependencies in `mix.exs`:

```elixir
def deps do
  [{:react_phoenix, "~> 0.4.0"}]
end
```

After adding to your mix file, run:

```
> mix deps.get
{'fraction_non_alphanumeric': 0.07289964040536123, 'fraction_numerical': 0.005884275907159202, 'mean_word_length': 4.604395604395604, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '431464', 'n_tokens_mistral': 876, 'n_tokens_neox': 845, 'n_words': 423}