react_on_rails 15.0.0.alpha.1 → 15.0.0.rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +479 -81
  3. data/CONTRIBUTING.md +61 -47
  4. data/Gemfile.development_dependencies +1 -1
  5. data/Gemfile.lock +4 -4
  6. data/KUDOS.md +22 -1
  7. data/NEWS.md +48 -48
  8. data/PROJECTS.md +45 -40
  9. data/README.md +24 -16
  10. data/SUMMARY.md +62 -52
  11. data/eslint.config.ts +213 -0
  12. data/knip.ts +100 -0
  13. data/lib/generators/USAGE +1 -1
  14. data/lib/generators/react_on_rails/dev_tests_generator.rb +4 -8
  15. data/lib/generators/react_on_rails/templates/.eslintrc +1 -1
  16. data/lib/generators/react_on_rails/templates/base/base/app/javascript/bundles/HelloWorld/components/HelloWorld.module.css +2 -2
  17. data/lib/generators/react_on_rails/templates/base/base/app/javascript/bundles/HelloWorld/components/HelloWorldServer.js +1 -1
  18. data/lib/generators/react_on_rails/templates/base/base/app/javascript/packs/registration.js.tt +1 -1
  19. data/lib/generators/react_on_rails/templates/base/base/config/shakapacker.yml +1 -1
  20. data/lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/reducers/helloWorldReducer.js +1 -1
  21. data/lib/react_on_rails/configuration.rb +81 -12
  22. data/lib/react_on_rails/controller.rb +4 -2
  23. data/lib/react_on_rails/engine.rb +1 -3
  24. data/lib/react_on_rails/helper.rb +184 -56
  25. data/lib/react_on_rails/locales/base.rb +7 -1
  26. data/lib/react_on_rails/packer_utils.rb +23 -3
  27. data/lib/react_on_rails/packs_generator.rb +84 -11
  28. data/lib/react_on_rails/prerender_error.rb +10 -2
  29. data/lib/react_on_rails/react_component/render_options.rb +39 -3
  30. data/lib/react_on_rails/server_rendering_pool/ruby_embedded_java_script.rb +6 -2
  31. data/lib/react_on_rails/test_helper/webpack_assets_status_checker.rb +4 -2
  32. data/lib/react_on_rails/utils.rb +67 -23
  33. data/lib/react_on_rails/version.rb +1 -1
  34. data/lib/react_on_rails/version_checker.rb +34 -23
  35. data/lib/tasks/assets.rake +1 -1
  36. data/react_on_rails.gemspec +2 -2
  37. data/tsconfig.eslint.json +6 -0
  38. data/tsconfig.json +10 -6
  39. metadata +8 -7
data/CONTRIBUTING.md CHANGED
@@ -1,44 +1,43 @@
1
1
  # Tips for Contributors
2
2
 
3
- * [docs/contributor-info/Releasing](./docs/contributor-info/releasing.md) for instructions on releasing.
4
- * [docs/contributor-info/pull-requests](./docs/contributor-info/pull-requests.md)
5
- * See other docs in [docs/contributor-info](./docs/contributor-info)
3
+ - [docs/contributor-info/Releasing](./docs/contributor-info/releasing.md) for instructions on releasing.
4
+ - [docs/contributor-info/pull-requests](./docs/contributor-info/pull-requests.md)
5
+ - See other docs in [docs/contributor-info](./docs/contributor-info)
6
6
 
7
- ## To run tests:
8
- * [Yalc](https://github.com/whitecolor/yalc) must be installed globally for most local development.
9
- * After updating code via git, to prepare all examples and run all tests:
7
+ ## Prerequisites
8
+
9
+ - [Yalc](https://github.com/whitecolor/yalc) must be installed globally for most local development.
10
+ - After updating code via Git, to prepare all examples:
10
11
 
11
12
  ```sh
12
13
  cd react_on_rails/
13
- bundle && yarn && rake examples:gen_all && rake node_package && rake
14
- ```
15
-
16
- In order to run tests in browser
17
- ```
18
- yarn global add browserify babelify tape-run faucet
19
- browserify -t babelify node_package/tests/*.js | tape-run | faucet
14
+ bundle && yarn && rake shakapacker_examples:gen_all && rake node_package && rake
20
15
  ```
21
16
 
22
- See Dev Initial Setup, below for, well... initial setup.
17
+ See [Dev Initial Setup](#dev-initial-setup) below for, well... initial setup,
18
+ and [Running tests](#running-tests) for more details on running tests.
23
19
 
24
20
  # IDE/IDE SETUP
25
- It's critical to configure your IDE/editor to ignore certain directories. Otherwise your IDE might slow to a crawl!
26
-
27
- * /coverage
28
- * /tmp
29
- * /gen-examples
30
- * /node_package/lib
31
- * /node_modules
32
- * /spec/dummy/app/assets/webpack
33
- * /spec/dummy/log
34
- * /spec/dummy/node_modules
35
- * /spec/dummy/client/node_modules
36
- * /spec/dummy/tmp
37
- * /spec/react_on_rails/dummy-for-generators
21
+
22
+ It's critical to configure your IDE/editor to ignore certain directories. Otherwise, your IDE might slow to a crawl!
23
+
24
+ - /coverage
25
+ - /tmp
26
+ - /gen-examples
27
+ - /node_package/lib
28
+ - /node_modules
29
+ - /spec/dummy/app/assets/webpack
30
+ - /spec/dummy/log
31
+ - /spec/dummy/node_modules
32
+ - /spec/dummy/client/node_modules
33
+ - /spec/dummy/tmp
34
+ - /spec/react_on_rails/dummy-for-generators
38
35
 
39
36
  # Configuring your test app to use your local fork
37
+
40
38
  You can test the `react-on-rails` gem using your own external test app or the gem's internal `spec/dummy` app. The `spec/dummy` app is an example of the various setup techniques you can use with the gem.
41
- ```
39
+
40
+ ```text
42
41
  ├── test_app
43
42
  | └── client
44
43
  └── react_on_rails
@@ -47,6 +46,7 @@ You can test the `react-on-rails` gem using your own external test app or the ge
47
46
  ```
48
47
 
49
48
  ## Testing the Ruby Gem
49
+
50
50
  If you want to test the ruby parts of the gem with an application before you release a new version of the gem, you can specify the path to your local version via your test app's Gemfile:
51
51
 
52
52
  ```ruby
@@ -55,8 +55,9 @@ gem "react_on_rails", path: "../path-to-react-on-rails"
55
55
 
56
56
  Note that you will need to bundle install after making this change, but also that **you will need to restart your Rails application if you make any changes to the gem**.
57
57
 
58
- ## Testing the Node package for react-on-rails via Yalc
59
- In addition to testing the Ruby parts out, you can also test the node package parts of the gem with an external application. First, be **sure** to build the NPM package:
58
+ ## Testing the Node package for React on Rails via Yalc
59
+
60
+ In addition to testing the Ruby parts out, you can also test the Node package parts of the gem with an external application. First, be **sure** to build the NPM package:
60
61
 
61
62
  ```sh
62
63
  cd react_on_rails/
@@ -76,8 +77,10 @@ yalc add react-on-rails
76
77
  ```
77
78
 
78
79
  The workflow is:
80
+
79
81
  1. Make changes to the node package.
80
82
  2. We need yalc to push and then run yarn:
83
+
81
84
  ```
82
85
  cd <top dir>
83
86
  # Will send the updates to other folders
@@ -99,6 +102,7 @@ Don't forget you may need to run yarn after adding packages with yalc to install
99
102
  ```
100
103
 
101
104
  #### Example: Testing NPM changes with the dummy app
105
+
102
106
  1. Add `console.log('Hello!')` to [clientStartup.ts, function render](https://github.com/shakacode/react_on_rails/blob/master/node_package/src/clientStartup.ts in `/node_package/src/clientStartup.js` to confirm we're getting an update to the node package client side. Do the same for function `serverRenderReactComponent` in `/node_package/src/serverRenderReactComponent.ts`.
103
107
  2. Refresh the browser if the server is already running or start the server using `foreman start` from `react_on_rails/spec/dummy` and navigate to `http://localhost:5000/`. You will now see the `Hello!` message printed in the browser's console. If you did not see that message, then review the steps above for the workflow of making changes and pushing them via yalc.
104
108
 
@@ -107,13 +111,14 @@ Don't forget you may need to run yarn after adding packages with yalc to install
107
111
  ## Dev Initial Setup
108
112
 
109
113
  ### Prereqs
110
- After checking out the repo, making sure you have rvm and nvm setup (setup ruby and node), cd to `spec/dummy` and run `bin/setup` to install ruby dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
114
+
115
+ After checking out the repo, making sure you have Ruby and Node version managers set up (such as rvm and nvm, or rbenv and nodenv, etc.), cd to `spec/dummy` and run `bin/setup` to install ruby dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
111
116
 
112
117
  ### Local Node Package
113
118
 
114
- Note, the example and dummy apps will use your local node_package folder as the react-on-rails node package. This will also be done automatically for you via the `rake examples:gen_all` rake task.
119
+ Note, the example and dummy apps will use your local `node_packages` folder as the `react-on-rails` node package. This will also be done automatically for you via the `rake examples:gen_all` rake task.
115
120
 
116
- *Side note: It's critical to use the alias section of the webpack config to avoid a double inclusion error. This has already been done for you in the example and dummy apps, but for reference:*
121
+ _Side note: It's critical to use the alias section of the Webpack config to avoid a double inclusion error. This has already been done for you in the example and dummy apps, but for reference:_
117
122
 
118
123
  ```js
119
124
  resolve: {
@@ -132,9 +137,8 @@ yarn
132
137
  yarn build
133
138
  ```
134
139
 
135
- Or run this which builds the yarn package, then the webpack files for spec/dummy, and runs tests in
136
- spec/dummy.
137
-
140
+ Or run this, which builds the Yarn package, then the Webpack files for `spec/dummy`, and runs tests in
141
+ `spec/dummy`.
138
142
 
139
143
  ```sh
140
144
  # Optionally change default capybara driver
@@ -153,21 +157,23 @@ script/convert
153
157
  yarn run dummy:spec
154
158
  ```
155
159
 
156
- ### Run NPM JS tests
160
+ ## Running tests
161
+
162
+ ### JS tests
157
163
 
158
164
  ```sh
159
165
  cd react_on_rails/
160
- yarn test
166
+ yarn run test
161
167
  ```
162
168
 
163
- ### Run spec/dummy tests
169
+ ### spec/dummy tests
164
170
 
165
171
  ```sh
166
172
  cd react_on_rails/spec/dummy
167
173
  rspec
168
174
  ```
169
175
 
170
- ### Run most tests and linting
176
+ ### Linting, type checking and JS tests together
171
177
 
172
178
  ```sh
173
179
  cd react_on_rails/
@@ -175,9 +181,11 @@ yarn run check
175
181
  ```
176
182
 
177
183
  ### Starting the Dummy App
178
- To run the dummy app, it's **CRITICAL** to not just run `rails s`. You have to run `foreman start` with one of the Procfiles. If you don't do this, then `webpack` will not generate a new bundle, and you will be seriously confused when you change JavaScript and the app does not change. If you change the webpack configs, then you need to restart foreman. If you change the JS code for react-on-rails, you need to run `yarn run build`. Since the react-on-rails package should be sym linked, you don't have to `yarn react-on-rails` after every change.
184
+
185
+ To run the dummy app, it's **CRITICAL** to not just run `rails s`. You have to run `foreman start` with one of the Procfiles. If you don't do this, then `webpack` will not generate a new bundle, and you will be seriously confused when you change JavaScript and the app does not change. If you change the Webpack configs, then you need to restart Foreman. If you change the JS code for react-on-rails, you need to run `yarn run build` in the project root.
179
186
 
180
187
  ### RSpec Testing
188
+
181
189
  Run `rake` for testing the gem and `spec/dummy`. Otherwise, the `rspec` command only works for testing within the sample apps, like `spec/dummy`.
182
190
 
183
191
  If you run `rspec` at the top level, you'll see this message: `require': cannot load such file -- rails_helper (LoadError)`
@@ -193,15 +201,16 @@ Run `rake -T` or `rake -D` to see testing options.
193
201
  See below for verifying changes to the generators.
194
202
 
195
203
  ### Install Generator
204
+
196
205
  In your Rails app add this gem with a path to your fork.
197
206
 
198
207
  ```ruby
199
208
  gem 'react_on_rails', path: '../relative/path/to/react_on_rails'
200
- ```
209
+ ```
201
210
 
202
211
  Then run `bundle`.
203
212
 
204
- The main installer can be run with ```rails generate react_on_rails:install```
213
+ The main installer can be run with `rails generate react_on_rails:install`
205
214
 
206
215
  Then use yalc to add the npm module.
207
216
 
@@ -218,19 +227,22 @@ yalc add react-on-rails
218
227
  ```
219
228
 
220
229
  ### Testing the Generator
221
- The generators are covered by generator tests using Rails's generator testing helpers, but it never hurts to do a sanity check and explore the API. See [generator_testing_script.md](generator_testing_script.md) for a script on how to run the generator on a fresh project.
222
230
 
223
- `rake run_rspec:example_basic` is a great way to run tests on one generator. Once that works, you should run `rake run_rspec:examples`. Be aware that this will create a hug number of files under a `/gen-examples` directory. You should be sure to exclude this directory from your IDE and delete it once your testing is done.
231
+ The generators are covered by generator tests using Rails's generator testing helpers, but it never hurts to do a sanity check and explore the API. See [generator-testing.md](docs/contributor-info/generator-testing.md) for a script on how to run the generator on a fresh project.
232
+
233
+ `rake run_rspec:shakapacker_examples_basic` is a great way to run tests on one generator. Once that works, you should run `rake run_rspec:shakapacker_examples`. Be aware that this will create a huge number of files under a `/gen-examples` directory. You should be sure to exclude this directory from your IDE and delete it once your testing is done.
224
234
 
225
235
  ### Linting
236
+
226
237
  All linting is performed from the docker container for CI. You will need docker and docker-compose installed locally to lint code changes via the lint container. You can lint locally by running `npm run lint && npm run flow`
227
238
 
228
- * [Install Docker Toolbox for Mac](https://www.docker.com/toolbox)
229
- * [Install Docker Compose for Linux](https://docs.docker.com/compose/install/)
239
+ - [Install Docker Toolbox for Mac](https://www.docker.com/toolbox)
240
+ - [Install Docker Compose for Linux](https://docs.docker.com/compose/install/)
230
241
 
231
242
  Once you have docker and docker-compose running locally, run `docker-compose build lint`. This will build the `reactonrails_lint` docker image and docker-compose `lint` container. The initial build is slow, but after the install, startup is very quick.
232
243
 
233
244
  ### Linting Commands
245
+
234
246
  Run `rake lint`.
235
247
 
236
248
  Alternately with Docker:
@@ -242,12 +254,14 @@ You can run specific linting for directories or files by using `docker-compose r
242
254
  `docker-compose run lint bash` sets you up to run from the container command line.
243
255
 
244
256
  ### Updating Rubocop
257
+
245
258
  2 files require updating to update the Rubocop version:
246
259
 
247
260
  1. `react_on_rails.gemspec`
248
261
  2. `spec/dummy/Gemfile`
249
262
 
250
263
  ### Docker CI - Test and Linting
264
+
251
265
  Docker CI and Tests containers have a xvfd server automatically started for headless browser testing with selenium and Firefox.
252
266
 
253
267
  Run `docker-compose build ci` to build the CI container. Run `docker-compose run ci` to start all rspec tests and linting. `docker-compose run --entrypoint=/bin/bash` will override the default CI action and place you inside the CI container in a bash session. This is what is run on Travis-CI.
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- gem "shakapacker", "8.0.0"
3
+ gem "shakapacker", "8.2.0"
4
4
  gem "bootsnap", require: false
5
5
  gem "rails", "~> 7.1"
6
6
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- react_on_rails (14.0.5)
4
+ react_on_rails (15.0.0.alpha.2)
5
5
  addressable
6
6
  connection_pool
7
7
  execjs (~> 2.5)
@@ -336,8 +336,8 @@ GEM
336
336
  rexml (~> 3.2, >= 3.2.5)
337
337
  rubyzip (>= 1.2.2, < 3.0)
338
338
  websocket (~> 1.0)
339
- semantic_range (3.0.0)
340
- shakapacker (8.0.0)
339
+ semantic_range (3.1.0)
340
+ shakapacker (8.2.0)
341
341
  activesupport (>= 5.2)
342
342
  package_json
343
343
  rack-proxy (>= 0.6.1)
@@ -431,7 +431,7 @@ DEPENDENCIES
431
431
  scss_lint
432
432
  sdoc
433
433
  selenium-webdriver (= 4.9.0)
434
- shakapacker (= 8.0.0)
434
+ shakapacker (= 8.2.0)
435
435
  spring (~> 4.0)
436
436
  sprockets (~> 4.0)
437
437
  sqlite3 (~> 1.6)
data/KUDOS.md CHANGED
@@ -11,83 +11,104 @@ I'm looking for quotes on why you like using React on Rails. You might mention a
11
11
  ![2017-10-07_00-18-43](https://user-images.githubusercontent.com/1118459/31306902-341a537a-aaf5-11e7-8014-28c126a7c975.png)
12
12
 
13
13
  ## June 9, 2017
14
+
14
15
  By Github Issue [#868](https://github.com/shakacode/react_on_rails/issues/868)
15
16
 
16
17
  ![image](https://user-images.githubusercontent.com/1118459/26994714-9aac5bb4-4d1d-11e7-8091-a3b08da9b319.png)
17
18
 
18
19
  ### May 6, 2017
20
+
19
21
  By Email
20
22
 
21
23
  ![image](https://cloud.githubusercontent.com/assets/1118459/25869348/b1bd27ce-349b-11e7-912c-11d05ab2bf4d.png)
22
24
 
23
25
  ### April 6, 2017
26
+
24
27
  Tyler Swayne on Medium: [Adding react to your node app](https://medium.com/@Tswaynee/adding-react-to-your-node-app-8707c5464b3)
25
28
 
26
29
  ![2017-04-06_16-11-51](https://cloud.githubusercontent.com/assets/1118459/24786595/75bb2b9c-1afe-11e7-8051-8c9046c4e007.png)
27
30
 
28
31
  ### March 23, 2017
32
+
29
33
  Github issue [#766](https://github.com/shakacode/react_on_rails/issues/766).
30
34
 
31
35
  ![2017-03-23_17-43-17](https://cloud.githubusercontent.com/assets/1118459/24279884/badab166-0ff0-11e7-87ab-94253f55a3d9.png)
32
36
 
33
37
  ### March 21, 2017
38
+
34
39
  Twitter from [@rfc2616](https://twitter.com/rfc2616)
35
40
 
36
41
  ![2017-03-24_20-20-20](https://cloud.githubusercontent.com/assets/1118459/24319983/7adfd57a-10cf-11e7-9a50-5c23d5d5bcab.png)
37
42
 
38
43
  ### March 2, 2017
44
+
39
45
  ![2017-03-05_21-34-34](https://cloud.githubusercontent.com/assets/1118459/23600716/0d8c40d6-01ec-11e7-998d-4ce9e6abcacb.png)
40
46
 
41
47
  ### February 24, 2017
48
+
42
49
  "I ❤️ React on Rails because it's easy to drop into a Rails project and still get all the power of native JavaScript tooling. The generators are great and the community is so awesome and welcoming. In fact, I love it so much I made a [course for learning React with Rails](https://goo.gl/uzu36X) using the react_on_rails gem!"
43
50
  ![The Complete React on Rails course](https://raw.githubusercontent.com/learnetto/calreact/whyror/public/why_react_on_rails_gem.png)
44
51
 
45
52
  ### December 20, 2016
53
+
46
54
  ![2016-12-25_10-02-17](https://cloud.githubusercontent.com/assets/1118459/21472700/70242a1e-ca89-11e6-9522-fb45f7835bbb.png)
47
55
 
48
56
  ### December 12, 2016
57
+
49
58
  ![2016-12-17_13-23-21](https://cloud.githubusercontent.com/assets/1118459/21290377/1adacdf2-c45c-11e6-97c1-f726ab749b2d.png)
50
59
 
51
60
  ### November 15, 2016
61
+
52
62
  ![2016-11-15_18-15-31](https://cloud.githubusercontent.com/assets/1118459/20334680/23eaab0c-ab60-11e6-8830-8528c2f829a3.png)
53
63
 
54
64
  ### November 9, 2016, in our Slack Room for ShakaCode
65
+
55
66
  ![2016-11-09_19-28-32](https://cloud.githubusercontent.com/assets/1118459/20163679/405229ca-a6b3-11e6-8dff-6dc3f59bf341.png)
56
67
 
57
68
  ### November 6, 2016
69
+
58
70
  https://github.com/shakacode/react_on_rails/pull/591#issuecomment-258685925
59
71
  ![2016-11-15_08-36-29](https://cloud.githubusercontent.com/assets/1118459/20318599/ec4882b0-ab0e-11e6-83e2-7f398e2cdf5b.png)
60
72
 
61
73
  ### October 29, 2016
74
+
62
75
  by Email
63
76
  ![2016-10-29_17-10-25](https://cloud.githubusercontent.com/assets/1118459/20163712/72307a82-a6b3-11e6-9c46-aee526192b23.png)
64
77
 
65
78
  ### September 11, 2016
79
+
66
80
  ![2016-09-11_17-55-46](https://cloud.githubusercontent.com/assets/1118459/18424209/0c8bdade-7849-11e6-96a7-3b58b26308ce.png)
67
81
 
68
82
  ### August 9, 2016
83
+
69
84
  ![2016-08-09_13-39-08](https://cloud.githubusercontent.com/assets/1118459/17543077/bf7c2c6a-5e69-11e6-8370-d714015c0296.png)
70
85
 
71
86
  ### June 15, 2016
87
+
72
88
  ![2016-06-15_08-57-25](https://cloud.githubusercontent.com/assets/1118459/16093324/33077310-32d7-11e6-88f3-69aa73bd7d9f.png)
73
89
 
74
- ### May 11, 2016
90
+ ### May 11, 2016
91
+
75
92
  ![2016-05-11_01-17-57](https://cloud.githubusercontent.com/assets/1118459/15179255/47418adc-1716-11e6-975e-c659a7de54d7.png)
76
93
 
77
94
  ![2016-05-11_00-54-57](https://cloud.githubusercontent.com/assets/1118459/15178739/1549ec2a-1713-11e6-961c-dc064186fc69.png)
78
95
 
79
96
  ### May 10, 2016
97
+
80
98
  ![2016-05-10_18-19-32](https://cloud.githubusercontent.com/assets/1118459/15170483/f00e344c-16e1-11e6-93f6-ded2637b227b.png)
81
99
 
82
100
  ### March 30, 2016
101
+
83
102
  "Gone are the days of using bower or rails gems to manage front end dependencies! React on Rails provides webpack integration to give us a modern build process, es6 syntax and the entire npm ecosystem of libraries to use, along with view helpers to make React integration with Rails feel better than a cool summer breeze." - [@kalamyty](https://twitter.com/kalamyty), [flynfish](https://github.com/flynfish).
84
103
 
85
104
  ### March 25, 2016
105
+
86
106
  https://twitter.com/ollieglass/status/713372606804729856
87
107
 
88
108
  ![2016-03-25_07-40-01](https://cloud.githubusercontent.com/assets/1118459/14053652/d05480f0-f276-11e5-9d9a-62d1146cd82d.png)
89
109
 
90
110
  ### March 23, 2016, Compared to Browserify
111
+
91
112
  See comments [here](https://lorefnon.me/2015/11/15/a-minimal-setup-for-using-es6-modules-in-rails.html)
92
113
 
93
114
  ![2016-03-23_16-24-51](https://cloud.githubusercontent.com/assets/1118459/14006786/ebf8cac2-f114-11e5-80f9-4a6d437dd071.png)
data/NEWS.md CHANGED
@@ -1,62 +1,62 @@
1
1
  # NEWS
2
2
 
3
- *A history of the news. A few bullets at the top will also show on the [README.md](./README.md).*
3
+ _A history of the news. A few bullets at the top will also show on the [README.md](./README.md)._
4
4
 
5
- * **October 14, 2020**: [RUBY ROGUES
6
- RR 474: React on Rails V12 – Don’t Shave That Yak! with Justin Gordon](https://devchat.tv/ruby-rogues/rr-474-react-on-rails-v12-dont-shave-that-yak-with-justin-gordon/).
5
+ - **October 14, 2020**: [RUBY ROGUES
6
+ RR 474: React on Rails V12 – Don’t Shave That Yak! with Justin Gordon](https://devchat.tv/ruby-rogues/rr-474-react-on-rails-v12-dont-shave-that-yak-with-justin-gordon/).
7
7
 
8
- * **October 1, 2020**: See the [spec/dummy](https://github.com/shakacode/react_on_rails/tree/master/spec/dummy) example repo for a simple configuration of webpack via the rails/webpacker gem
9
- that supports SSR.
10
- * **August 2, 2020**: See the example repo of [React on Rails Tutorial With SSR, HMR fast refresh, and TypeScript](https://github.com/shakacode/react_on_rails_demo_ssr_hmr) for a new way to setup the creation of your SSR bundle with `rails/webpacker`.
11
- * July 8, 2020: Release **v12**.
8
+ - **October 1, 2020**: See the [spec/dummy](https://github.com/shakacode/react_on_rails/tree/master/spec/dummy) example repo for a simple configuration of Webpack via the rails/webpacker gem
9
+ that supports SSR.
10
+ - **August 2, 2020**: See the example repo of [React on Rails Tutorial With SSR, HMR fast refresh, and TypeScript](https://github.com/shakacode/react_on_rails_demo_ssr_hmr) for a new way to set up the creation of your SSR bundle with `rails/webpacker`.
11
+ - July 8, 2020: Release **v12**.
12
12
  1. **React Hooks Support** for top level components
13
13
  2. **Typescript bindings**
14
14
  3. **rails/webpacker** "just works" with React on Rails by default.
15
15
  4. i18n support for generating a JSON file rather than a JS file.
16
- * 2018-02-27: **Version 10.1.2** Supports the React API for ReactDOM.hydrate.
17
- * 2017-09-06: **VERSION 9.0.0 shipped!** This version depends on Webpacker directly. See [Upgrading React on Rails](./docs/guides/upgrading-react-on-rails.md) for more concise instructions on upgrading.
18
- * Always see the [CHANGELOG.md](./CHANGELOG.md) for the latest project changes.
19
- * [VERSION 8.1.0](https://rubygems.org/gems/react_on_rails/) shipped with [webpacker_lite](https://github.com/shakacode/webpacker_lite) (soon [**webpacker**](https://github.com/rails/webpacker/issues/464#issuecomment-310986140) support! [react-webpack-rails-tutorial PR #395](https://github.com/shakacode/react-webpack-rails-tutorial/pull/395) shows the changes needed to migrate from the Asset Pipeline to Webpacker Lite. For more information, see my article: [Webpacker Lite: Why Fork Webpacker?](https://blog.shakacode.com/webpacker-lite-why-fork-webpacker-f0a7707fac92). Per recent discussions, we [will merge Webpacker Lite changes back into Webpacker](https://github.com/rails/webpacker/issues/464#issuecomment-310986140). There's no reason to wait for this. The upgrade will eventually be trivial.
20
- * 2017-04-25: 7.0.0 Shipped! Performance improvements! Please upgrade! Only "breaking" change is that you have to update both the node module and the Ruby gem.
21
- * 2017-04-09: 8.0.0 beta work to include webpacker_lite gem has begun. See [#786](https://github.com/shakacode/react_on_rails/issues/786).
22
- * 2017-04-03: 6.9.3 Released! Props rendered in JSON script tag. Page size is smaller now due to less escaping!
23
- * 2017-03-06: Updated to Webpack v2!
24
- * 2017-03-02: Demo of internationalization (i18n) is live at [reactrails.com](https://www.reactrails.com/). Docs [here](docs/guides/i18n.md).
25
- * 2017-02-28: See [discussions here on Webpacker](https://github.com/rails/webpacker/issues/139) regarding how Webpacker will allow React on Rails to avoid using the asset pipeline in the near future.
26
- * 2017-02-28: Upgrade to Webpack v2 or use the `--bail` option in your webpack script for test and production builds. See the discussion on [PR #730](https://github.com/shakacode/react_on_rails/pull/730).
27
- * 2016-11-03: Spoke at [LA Ruby: "React on Rails: Why, What, and How?"](http://www.meetup.com/laruby/events/234825187/). [Video and pictures in this article](https://blog.shakacode.com/my-react-on-rails-talk-at-the-la-ruby-rails-meetup-november-10-2016-eaaa83aff800#.ej6h4eglp).
28
- * 2016-12-20: New Video on Egghead.io: [Creating a component with React on Rails](https://egghead.io/lessons/react-creating-a-component-with-react-on-rails)
29
- * 2016-11-03: Spoke at [LA Ruby, 7pm, Thursday, November 10 in Venice, CA: "React on Rails: Why, What, and How?"](http://www.meetup.com/laruby/events/234825187/). [Video and pictures in this article](https://blog.shakacode.com/my-react-on-rails-talk-at-the-la-ruby-rails-meetup-november-10-2016-eaaa83aff800#.ej6h4eglp).
30
- * 2016-08-27: We now have a [Documentation Gitbook](https://shakacode.gitbooks.io/react-on-rails/content/) for improved readability & reference.
31
- * 2016-08-21: v6.1 ships with several new features and bug fixes. See the [Changelog](CHANGELOG.md).
32
- * 2016-07-28: If you're doing server rendering, be sure to use mini\_racer! See [issues/428](https://github.com/shakacode/react_on_rails/issues/428). It's supposedly much faster than `therubyracer`.
16
+ - 2018-02-27: **Version 10.1.2** Supports the React API for ReactDOM.hydrate.
17
+ - 2017-09-06: **VERSION 9.0.0 shipped!** This version depends on Webpacker directly. See [Upgrading React on Rails](./docs/guides/upgrading-react-on-rails.md) for more concise instructions on upgrading.
18
+ - Always see the [CHANGELOG.md](./CHANGELOG.md) for the latest project changes.
19
+ - [VERSION 8.1.0](https://rubygems.org/gems/react_on_rails/) shipped with [webpacker_lite](https://github.com/shakacode/webpacker_lite) (soon [**webpacker**](https://github.com/rails/webpacker/issues/464#issuecomment-310986140) support! [react-webpack-rails-tutorial PR #395](https://github.com/shakacode/react-webpack-rails-tutorial/pull/395) shows the changes needed to migrate from the Asset Pipeline to Webpacker Lite. For more information, see my article: [Webpacker Lite: Why Fork Webpacker?](https://blog.shakacode.com/webpacker-lite-why-fork-webpacker-f0a7707fac92). Per recent discussions, we [will merge Webpacker Lite changes back into Webpacker](https://github.com/rails/webpacker/issues/464#issuecomment-310986140). There's no reason to wait for this. The upgrade will eventually be trivial.
20
+ - 2017-04-25: 7.0.0 Shipped! Performance improvements! Please upgrade! Only "breaking" change is that you have to update both the node module and the Ruby gem.
21
+ - 2017-04-09: 8.0.0 beta work to include webpacker_lite gem has begun. See [#786](https://github.com/shakacode/react_on_rails/issues/786).
22
+ - 2017-04-03: 6.9.3 Released! Props rendered in JSON script tag. Page size is smaller now due to less escaping!
23
+ - 2017-03-06: Updated to Webpack v2!
24
+ - 2017-03-02: Demo of internationalization (i18n) is live at [reactrails.com](https://www.reactrails.com/). Docs [here](docs/guides/i18n.md).
25
+ - 2017-02-28: See [discussions here on Webpacker](https://github.com/rails/webpacker/issues/139) regarding how Webpacker will allow React on Rails to avoid using the asset pipeline in the near future.
26
+ - 2017-02-28: Upgrade to Webpack v2 or use the `--bail` option in your Webpack script for test and production builds. See the discussion on [PR #730](https://github.com/shakacode/react_on_rails/pull/730).
27
+ - 2016-11-03: Spoke at [LA Ruby: "React on Rails: Why, What, and How?"](http://www.meetup.com/laruby/events/234825187/). [Video and pictures in this article](https://blog.shakacode.com/my-react-on-rails-talk-at-the-la-ruby-rails-meetup-november-10-2016-eaaa83aff800#.ej6h4eglp).
28
+ - 2016-12-20: New Video on Egghead.io: [Creating a component with React on Rails](https://egghead.io/lessons/react-creating-a-component-with-react-on-rails)
29
+ - 2016-11-03: Spoke at [LA Ruby, 7pm, Thursday, November 10 in Venice, CA: "React on Rails: Why, What, and How?"](http://www.meetup.com/laruby/events/234825187/). [Video and pictures in this article](https://blog.shakacode.com/my-react-on-rails-talk-at-the-la-ruby-rails-meetup-november-10-2016-eaaa83aff800#.ej6h4eglp).
30
+ - 2016-08-27: We now have a [Documentation Gitbook](https://shakacode.gitbooks.io/react-on-rails/content/) for improved readability & reference.
31
+ - 2016-08-21: v6.1 ships with several new features and bug fixes. See the [Changelog](CHANGELOG.md).
32
+ - 2016-07-28: If you're doing server rendering, be sure to use mini_racer! See [issues/428](https://github.com/shakacode/react_on_rails/issues/428). It's supposedly much faster than `therubyracer`.
33
33
 
34
- * 2016-08-27: We now have a [Documentation Gitbook](https://shakacode.gitbooks.io/react-on-rails/content/) for improved readability & reference.
35
- * 2016-08-21: v6.1 ships with several new features and bug fixes. See the [Changelog](CHANGELOG.md).
36
- * 2016-06-13: 6.0.4 shipped with a critical fix regarding a missing polyfill for `clearTimeout`, used by babel-polyfill.
37
- * 2016-06-06: 6.0.2 shipped with a critical fix if you are fragment caching the server generated React.
38
- * 2016-05-24: 6.0.0 Released! Simplified generator and install process! See the [CHANGELOG.md](./CHANGELOG.md) for details.
39
- * 2016-04-08: 5.2.0 Released! Support for React 15.0 and updates to the Generator.
40
- * 2016-03-18: [Slides on React on Rails](http://www.slideshare.net/justingordon/react-on-rails-v4032).
41
- * 2016-03-17: **4.0.3** Shipped! Includes using the new Heroku buildpack steps, several smaller changes detailed in the [CHANGELOG.md](./CHANGELOG.md).
42
- * 2016-03-17: **4.0.2** Shipped! Includes using the new Heroku buildpack steps.
43
- * Better support for hot reloading of assets from Rails with new helpers and updates to the sample testing app, [spec/dummy](spec/dummy).
44
- * Better support for Turbolinks 5.
45
- * Controller rendering of shared redux stores and ability to render store data at bottom of HTML page.
46
- * See [#311](https://github.com/shakacode/react_on_rails/pull/311/files).
47
- * Some breaking changes! See [CHANGELOG.md](./CHANGELOG.md) for details.
48
- * 2016-02-28: We added a [Projects page](PROJECTS.md). Please edit the page your project or [email us](mailto:contact@shakacode.com) and we'll add you. We also love stars as it helps us attract new users and contributors. [jbhatab](https://github.com/jbhatab) is leading an effort to ease the onboarding process for newbies with simpler project generators. See [#245](https://github.com/shakacode/react_on_rails/issues/245).
49
- * 3.0.6 shipped on Tuesday, 2016-03-01. Please see the [Changelog](CHANGELOG.md) for details, and let us know if you see any issues! [Migration steps from 1.x](https://github.com/shakacode/react_on_rails/blob/master/CHANGELOG.md#migration-steps-v1-to-v2). [Migration steps from 2.x](https://github.com/shakacode/react_on_rails/blob/master/CHANGELOG.md#migration-steps-v2-to-v3).
50
- * [RubyGems](https://rubygems.org/gems/react_on_rails/)
51
- * [NPM](https://www.npmjs.com/package/react-on-rails)
52
- * 3.0.0 Highlights:
34
+ - 2016-08-27: We now have a [Documentation Gitbook](https://shakacode.gitbooks.io/react-on-rails/content/) for improved readability & reference.
35
+ - 2016-08-21: v6.1 ships with several new features and bug fixes. See the [Changelog](CHANGELOG.md).
36
+ - 2016-06-13: 6.0.4 shipped with a critical fix regarding a missing polyfill for `clearTimeout`, used by babel-polyfill.
37
+ - 2016-06-06: 6.0.2 shipped with a critical fix if you are fragment caching the server generated React.
38
+ - 2016-05-24: 6.0.0 Released! Simplified generator and install process! See the [CHANGELOG.md](./CHANGELOG.md) for details.
39
+ - 2016-04-08: 5.2.0 Released! Support for React 15.0 and updates to the Generator.
40
+ - 2016-03-18: [Slides on React on Rails](http://www.slideshare.net/justingordon/react-on-rails-v4032).
41
+ - 2016-03-17: **4.0.3** Shipped! Includes using the new Heroku buildpack steps, several smaller changes detailed in the [CHANGELOG.md](./CHANGELOG.md).
42
+ - 2016-03-17: **4.0.2** Shipped! Includes using the new Heroku buildpack steps.
43
+ - Better support for hot reloading of assets from Rails with new helpers and updates to the sample testing app, [spec/dummy](spec/dummy).
44
+ - Better support for Turbolinks 5.
45
+ - Controller rendering of shared Redux stores and ability to render store data at bottom of HTML page.
46
+ - See [#311](https://github.com/shakacode/react_on_rails/pull/311/files).
47
+ - Some breaking changes! See [CHANGELOG.md](./CHANGELOG.md) for details.
48
+ - 2016-02-28: We added a [Projects page](PROJECTS.md). Please edit the page your project or [email us](mailto:contact@shakacode.com) and we'll add you. We also love stars as it helps us attract new users and contributors. [jbhatab](https://github.com/jbhatab) is leading an effort to ease the onboarding process for newbies with simpler project generators. See [#245](https://github.com/shakacode/react_on_rails/issues/245).
49
+ - 3.0.6 shipped on Tuesday, 2016-03-01. Please see the [Changelog](CHANGELOG.md) for details, and let us know if you see any issues! [Migration steps from 1.x](https://github.com/shakacode/react_on_rails/blob/master/CHANGELOG.md#migration-steps-v1-to-v2). [Migration steps from 2.x](https://github.com/shakacode/react_on_rails/blob/master/CHANGELOG.md#migration-steps-v2-to-v3).
50
+ - [RubyGems](https://rubygems.org/gems/react_on_rails/)
51
+ - [NPM](https://www.npmjs.com/package/react-on-rails)
52
+ - 3.0.0 Highlights:
53
53
  1. Support for ensuring JavaScript is current when running tests.
54
54
  2. Support for multiple React components with one Redux store. So you can have a header React component and different body React components talking to the same Redux store!
55
55
  3. Support for Turbolinks 5!
56
- * There was a fatal error when using the lastest version of Redux for server rendering. See [Redux #1335](https://github.com/reactjs/redux/issues/1335). See [diff 3.1.6...3.1.4](https://github.com/reactjs/redux/commit/e2e14d26f09ca729ae0555442f50fcfc45bfb423#diff-1fdf421c05c1140f6d71444ea2b27638). Workaround for server rendering: Use Redux 3.1.7 or upgrade to React On Rails v2.3.0. [this commit](https://github.com/shakacode/react_on_rails/commit/59f1e68d3d233775e6abc63bff180ea59ac2d79e) on [PR #244](https://github.com/shakacode/react_on_rails/pull/244/).
57
- * 2.x Highlights:
56
+ - There was a fatal error when using the latest version of Redux for server rendering. See [Redux #1335](https://github.com/reactjs/redux/issues/1335). See [diff 3.1.6...3.1.4](https://github.com/reactjs/redux/commit/e2e14d26f09ca729ae0555442f50fcfc45bfb423#diff-1fdf421c05c1140f6d71444ea2b27638). Workaround for server rendering: Use Redux 3.1.7 or upgrade to React On Rails v2.3.0. [this commit](https://github.com/shakacode/react_on_rails/commit/59f1e68d3d233775e6abc63bff180ea59ac2d79e) on [PR #244](https://github.com/shakacode/react_on_rails/pull/244/).
57
+ - 2.x Highlights:
58
58
  1. Fixed a **critical** problem with TurboLinks. Be sure to see [turbolinks docs](docs/additional-reading/turbolinks.md) for more information on how to debug TurboLinks issues.
59
59
  2. Provides a convenient helper to ensure that JavaScript assets are compiled before running tests.
60
- * React on Rails does not yet have *generator* support for building new apps that use CSS modules and hot reloading via the Rails server as is demonstrated in the [shakacode/react-webpack-rails-tutorial](https://github.com/shakacode/react-webpack-rails-tutorial/). *We do support this, but we don't generate the code.* If you did generate a fresh app from react_on_rails and want to move to CSS Modules, then see [PR 175: Babel 6 / CSS Modules / Rails hot reloading](https://github.com/shakacode/react-webpack-rails-tutorial/pull/175). Note, while there are probably fixes after this PR was accepted, this has the majority of the changes. See [the tutorial](https://github.com/shakacode/react-webpack-rails-tutorial/#news) for more information. Ping us if you want to help!
61
- * [ShakaCode](http://www.shakacode.com) is doing Skype plus Slack/Github based coaching for "React on Rails". [Click here](http://www.shakacode.com/work/index.html) for more information.
62
- * Be sure to read our article [The React on Rails Doctrine](https://medium.com/@railsonmaui/the-react-on-rails-doctrine-3c59a778c724).
60
+ - React on Rails does not yet have _generator_ support for building new apps that use CSS modules and hot reloading via the Rails server as is demonstrated in the [shakacode/react-webpack-rails-tutorial](https://github.com/shakacode/react-webpack-rails-tutorial/). _We do support this, but we don't generate the code._ If you did generate a fresh app from react_on_rails and want to move to CSS Modules, then see [PR 175: Babel 6 / CSS Modules / Rails hot reloading](https://github.com/shakacode/react-webpack-rails-tutorial/pull/175). Note, while there are probably fixes after this PR was accepted, this has the majority of the changes. See [the tutorial](https://github.com/shakacode/react-webpack-rails-tutorial/#news) for more information. Ping us if you want to help!
61
+ - [ShakaCode](http://www.shakacode.com) is doing Skype plus Slack/GitHub based coaching for "React on Rails". [Click here](http://www.shakacode.com/work/index.html) for more information.
62
+ - Be sure to read our article [The React on Rails Doctrine](https://medium.com/@railsonmaui/the-react-on-rails-doctrine-3c59a778c724).