Skip to content

Commit c51a917

Browse files
cprodhommeBookOfGreg
authored andcommitted
Update README.md (#981)
1 parent 5f48674 commit c51a917

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ $ cd my-app
6464
```
6565

6666
##### 2) Add `webpacker` and `react-rails` to your gemfile:
67-
```
67+
```ruby
6868
gem 'webpacker'
6969
gem 'react-rails'
7070
```
@@ -83,7 +83,7 @@ This gives you:
8383
- `app/javascript/packs/server_rendering.js` for [server-side rendering](#server-side-rendering)
8484

8585
##### 4) Link the JavaScript pack in Rails view using `javascript_pack_tag` [helper](https://github.com/rails/webpacker#usage):
86-
```
86+
```erb
8787
<!-- application.html.erb in Head tag below turbolinks -->
8888
<%= javascript_pack_tag 'application' %>
8989
```
@@ -102,7 +102,7 @@ Note: Your component is added to `app/javascript/components/` by default.
102102

103103
##### 7) [Render it in a Rails view](#view-helper):
104104

105-
```
105+
```erb
106106
<!-- erb: paste this in view -->
107107
<%= react_component("HelloWorld", { greeting: "Hello from react-rails." }) %>
108108
```
@@ -192,7 +192,7 @@ end
192192

193193
`react-rails` provides a pre-bundled React.js & a UJS driver to the Rails asset pipeline. Get started by adding the `react-rails` gem:
194194

195-
```
195+
```ruby
196196
gem 'react-rails'
197197
```
198198

0 commit comments

Comments
 (0)