I created a rails app with `webpack=react`. I create my model `Post` with attributes as usual, and at the controller I render JSON of all.

**posts\_controller.erb**

```rb
def index 
  @posts = Post.all          

  render json: { data: @posts }
end

```

Then, I add the JS pack `<%= javascript_pack_tag 'hello_react' %>` to the application.html.erb file, like this:

**application.html.erb**

```
<!DOCTYPE html>
<html>
  <head>
    <title>RailsReactPokedex</title>
    <%= csrf_meta_tags %>
    <%= csp_meta_tag %>

    <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
    <%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
    <%= javascript_pack_tag 'hello_react' %>
  </head>

  <body>
    <%= yield %>
  </body>
</html>

```

My routes file to the index:

```rb
Rails.application.routes.draw do
  root "posts#index"
end

```

And when I start the server, the browser renders the JSON, instead of the 'Hello-React' message.

Any ideas what could be failing?