react_on_rails 15.0.0.alpha.2 → 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 (32) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +435 -78
  3. data/CONTRIBUTING.md +53 -35
  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 +19 -10
  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 +52 -8
  22. data/lib/react_on_rails/controller.rb +4 -2
  23. data/lib/react_on_rails/helper.rb +16 -4
  24. data/lib/react_on_rails/packs_generator.rb +4 -10
  25. data/lib/react_on_rails/react_component/render_options.rb +13 -1
  26. data/lib/react_on_rails/test_helper/webpack_assets_status_checker.rb +2 -0
  27. data/lib/react_on_rails/utils.rb +23 -0
  28. data/lib/react_on_rails/version.rb +1 -1
  29. data/lib/tasks/assets.rake +1 -1
  30. data/tsconfig.eslint.json +6 -0
  31. data/tsconfig.json +3 -2
  32. metadata +5 -5
data/CHANGELOG.md CHANGED
@@ -1,30 +1,66 @@
1
1
  # Change Log
2
- All notable changes to this project's source code will be documented in this file. Items under `Unreleased` is upcoming features that will be out in the next version.
2
+
3
+ All notable changes to this project's source code will be documented in this file. Items under `Unreleased` is upcoming features that will be out in the next version.
3
4
 
4
5
  Migration instructions for the major updates can be found [here](https://www.shakacode.com/react-on-rails/docs/guides/upgrading-react-on-rails#upgrading-to-version-9.md). Some smaller migration information can be found here.
5
6
 
6
7
  ## Want to Save Time Updating?
7
8
 
8
- If you need help upgrading `react_on_rails`, `webpacker` to `shakapacker`, or JS packages, contact justin@shakacode.com. We can upgrade your project and improve your development and customer experiences, allowing you to focus on building new features or fixing bugs instead.
9
+ If you need help upgrading `react_on_rails`, `webpacker` to `shakapacker`, or JS packages, contact justin@shakacode.com. We can upgrade your project and improve your development and customer experiences, allowing you to focus on building new features or fixing bugs instead.
9
10
 
10
11
  For an overview of working with us, see our [Client Engagement Model](https://www.shakacode.com/blog/client-engagement-model/) article and [how we bill for time](https://www.shakacode.com/blog/shortcut-jira-trello-github-toggl-time-and-task-tracking/).
11
12
 
12
13
  If you think ShakaCode can help your project, [click here](https://meetings.hubspot.com/justingordon/30-minute-consultation) to book a call with [Justin Gordon](mailto:justin@shakacode.com), the creator of React on Rails and Shakapacker.
13
14
 
14
15
  ## Contributors
15
- Please follow the recommendations outlined at [keepachangelog.com](http://keepachangelog.com/). Please use the existing headings and styling as a guide, and add a link for the version diff at the bottom of the file. Also, please update the `Unreleased` link to compare to the latest release version.
16
+
17
+ Please follow the recommendations outlined at [keepachangelog.com](http://keepachangelog.com/). Please use the existing headings and styling as a guide.
18
+ After a release, please make sure to run `bundle exec rake update_changelog`. This will add a heading for the latest version and update the links at the end of the file.
16
19
 
17
20
  ## Versions
21
+
18
22
  ### [Unreleased]
23
+
19
24
  Changes since the last non-beta release.
20
25
 
26
+ #### Improved
27
+
28
+ - Improved RSC rendering flow by eliminating double rendering of server components and reducing the number of HTTP requests.
29
+ - Updated communication protocol between Node Renderer and Rails to version 2.0.0 which supports the ability to upload multiple bundles at once.
30
+ - Added `RSCRoute` component to enable seamless server-side rendering of React Server Components. This component automatically handles RSC payload injection and hydration, allowing server components to be rendered directly within client components while maintaining optimal performance.
31
+
32
+ [PR 1696](https://github.com/shakacode/react_on_rails/pull/1696) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
33
+
34
+ #### Added
35
+
36
+ - Configuration option `generated_component_packs_loading_strategy` to control how generated component packs are loaded. It supports `sync`, `async`, and `defer` strategies. [PR 1712](https://github.com/shakacode/react_on_rails/pull/1712) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
37
+
38
+ - Support for returning React component from async render-function. [PR 1720](https://github.com/shakacode/react_on_rails/pull/1720) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
39
+
40
+ ### Removed (Breaking Changes)
41
+
42
+ - Deprecated `defer_generated_component_packs` configuration option. You should use `generated_component_packs_loading_strategy` instead. [PR 1712](https://github.com/shakacode/react_on_rails/pull/1712) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
43
+
44
+ ### Changed
45
+
46
+ - **Breaking change**: The package is ESM-only now. Please see [Release Notes](docs/release-notes/15.0.0.md#esm-only-package) for more details.
47
+ - The global context is now accessed using `globalThis`. [PR 1727](https://github.com/shakacode/react_on_rails/pull/1727) by [alexeyr-ci2](https://github.com/alexeyr-ci2).
48
+ - Generated client packs now import from `react-on-rails/client` instead of `react-on-rails`. [PR 1706](https://github.com/shakacode/react_on_rails/pull/1706) by [alexeyr-ci](https://github.com/alexeyr-ci).
49
+ - The "optimization opportunity" message when importing the server-side `react-on-rails` instead of `react-on-rails/client` in browsers is now a warning for two reasons:
50
+ - Make it more prominent
51
+ - Include a stack trace when clicked
52
+
53
+ ### [15.0.0-alpha.2] - 2025-03-07
54
+
21
55
  See [Release Notes](docs/release-notes/15.0.0.md) for full details.
22
56
 
23
57
  #### Added
58
+
24
59
  - React Server Components Support (Pro Feature) [PR 1644](https://github.com/shakacode/react_on_rails/pull/1644) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
25
60
  - Improved component and store hydration performance [PR 1656](https://github.com/shakacode/react_on_rails/pull/1656) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
26
61
 
27
62
  #### Breaking Changes
63
+
28
64
  - `ReactOnRails.reactOnRailsPageLoaded` is now an async function
29
65
  - `force_load` configuration now defaults to `true`
30
66
  - `defer_generated_component_packs` configuration now defaults to `false`
@@ -32,21 +68,24 @@ See [Release Notes](docs/release-notes/15.0.0.md) for full details.
32
68
  ### [14.2.0] - 2025-03-03
33
69
 
34
70
  #### Added
71
+
35
72
  - Add export option 'react-on-rails/client' to avoid shipping server-rendering code to browsers (~5KB improvement) [PR 1697](https://github.com/shakacode/react_on_rails/pull/1697) by [Romex91](https://github.com/Romex91).
36
73
 
37
74
  #### Fixed
75
+
38
76
  - Fix obscure errors by introducing FULL_TEXT_ERRORS [PR 1695](https://github.com/shakacode/react_on_rails/pull/1695) by [Romex91](https://github.com/Romex91).
39
77
  - Disable `esModuleInterop` to increase interoperability [PR 1699](https://github.com/shakacode/react_on_rails/pull/1699) by [alexeyr-ci](https://github.com/alexeyr-ci).
40
78
  - Resolved 14.1.1 incompatibility with eslint & made sure that spec/dummy is linted by eslint. [PR 1693](https://github.com/shakacode/react_on_rails/pull/1693) by [judahmeek](https://github.com/judahmeek).
41
79
 
42
80
  #### Changed
81
+
43
82
  - More up-to-date TS config [PR 1700](https://github.com/shakacode/react_on_rails/pull/1700) by [alexeyr-ci](https://github.com/alexeyr-ci).
44
83
 
45
84
  ### [14.1.1] - 2025-01-15
46
85
 
47
86
  #### Fixed
48
87
 
49
- - Separated streamServerRenderedReactComponent from the ReactOnRails object in order to stop users from getting errors during webpack compilation about needing the `stream-browserify` package. [PR 1680](https://github.com/shakacode/react_on_rails/pull/1680) by [judahmeek](https://github.com/judahmeek).
88
+ - Separated streamServerRenderedReactComponent from the ReactOnRails object in order to stop users from getting errors during Webpack compilation about needing the `stream-browserify` package. [PR 1680](https://github.com/shakacode/react_on_rails/pull/1680) by [judahmeek](https://github.com/judahmeek).
50
89
  - Removed obsolete `js-yaml` peer dependency. [PR 1678](https://github.com/shakacode/react_on_rails/pull/1678) by [alexeyr-ci](https://github.com/alexeyr-ci).
51
90
 
52
91
  ### [14.1.0] - 2025-01-06
@@ -59,6 +98,7 @@ See [Release Notes](docs/release-notes/15.0.0.md) for full details.
59
98
  - Enable use as a `git:` dependency. [PR 1664](https://github.com/shakacode/react_on_rails/pull/1664) by [alexeyr-ci](https://github.com/alexeyr-ci).
60
99
 
61
100
  #### Added
101
+
62
102
  - Added streaming server rendering support:
63
103
  - [PR #1633](https://github.com/shakacode/react_on_rails/pull/1633) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
64
104
  - New `stream_react_component` helper for adding streamed components to views
@@ -69,23 +109,29 @@ See [Release Notes](docs/release-notes/15.0.0.md) for full details.
69
109
  - Added support for passing options to `YAML.safe_load` when loading locale files with `config.i18n_yml_safe_load_options`. [PR #1668](https://github.com/shakacode/react_on_rails/pull/1668) by [dzirtusss](https://github.com/dzirtusss).
70
110
 
71
111
  #### Changed
112
+
72
113
  - Console replay script generation now awaits the render request promise before generating, allowing it to capture console logs from asynchronous operations. This requires using a version of the Node renderer that supports replaying async console logs. [PR #1649](https://github.com/shakacode/react_on_rails/pull/1649) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
73
114
 
74
115
  ### [14.0.5] - 2024-08-20
116
+
75
117
  #### Fixed
118
+
76
119
  - Should force load react-components which send over turbo-stream [PR #1620](https://github.com/shakacode/react_on_rails/pull/1620) by [theforestvn88](https://github.com/theforestvn88).
77
120
 
78
121
  ### [14.0.4] - 2024-07-02
79
122
 
80
123
  #### Improved
124
+
81
125
  - Improved dependency management by integrating package_json. [PR 1639](https://github.com/shakacode/react_on_rails/pull/1639) by [vaukalak](https://github.com/vaukalak).
82
126
 
83
127
  #### Changed
128
+
84
129
  - Update outdated GitHub Actions to use Node.js 20.0 versions instead [PR 1623](https://github.com/shakacode/react_on_rails/pull/1623) by [adriangohjw](https://github.com/adriangohjw).
85
130
 
86
131
  ### [14.0.3] - 2024-06-28
87
132
 
88
133
  #### Fixed
134
+
89
135
  - Fixed css-loader installation with [PR 1634](https://github.com/shakacode/react_on_rails/pull/1634) by [vaukalak](https://github.com/vaukalak).
90
136
  - Address a number of typos and grammar mistakes [PR 1631](https://github.com/shakacode/react_on_rails/pull/1631) by [G-Rath](https://github.com/G-Rath).
91
137
  - Adds an adapter module & improves test suite to support all versions of Shakapacker. [PR 1622](https://github.com/shakacode/react_on_rails/pull/1622) by [adriangohjw](https://github.com/adriangohjw) and [judahmeek](https://github.com/judahmeek).
@@ -93,96 +139,121 @@ See [Release Notes](docs/release-notes/15.0.0.md) for full details.
93
139
  ### [14.0.2] - 2024-06-11
94
140
 
95
141
  #### Fixed
142
+
96
143
  - Generator errors with Shakapacker v8+ fixed [PR 1629](https://github.com/shakacode/react_on_rails/pull/1629) by [vaukalak](https://github.com/vaukalak)
97
144
 
98
145
  ### [14.0.1] - 2024-05-16
99
146
 
100
147
  #### Fixed
148
+
101
149
  - Pack Generation: Added functionality that will add an import statement, if missing, to the server bundle entry point even if the auto-bundle generated files still exist [PR 1610](https://github.com/shakacode/react_on_rails/pull/1610) by [judahmeek](https://github.com/judahmeek).
102
150
 
103
151
  ### [14.0.0] - 2024-04-03
152
+
104
153
  _Major bump because dropping support for Ruby 2.7 and deprecated `webpackConfigLoader.js`._
105
154
 
106
155
  #### Removed
156
+
107
157
  - Dropped Ruby 2.7 support [PR 1595](https://github.com/shakacode/react_on_rails/pull/1595) by [ahangarha](https://github.com/ahangarha).
108
158
  - Removed deprecated `webpackConfigLoader.js` [PR 1600](https://github.com/shakacode/react_on_rails/pull/1600) by [ahangarha](https://github.com/ahangarha).
109
159
 
110
160
  #### Fixed
161
+
111
162
  - Trimmed the Gem to remove package.json which could cause superflous security warnings. [PR 1605](https://github.com/shakacode/react_on_rails/pull/1605) by [justin808](https://github.com/justin808).
112
163
  - Prevent displaying the deprecation message for using `webpacker_precompile?` method and `webpacker:clean` rake task when using Shakapacker v7+ [PR 1592](https://github.com/shakacode/react_on_rails/pull/1592) by [ahangarha](https://github.com/ahangarha).
113
164
  - Fixed Typescript types for ServerRenderResult, ReactComponent, RenderFunction, and RailsContext interfaces. [PR 1582](https://github.com/shakacode/react_on_rails/pull/1582) & [PR 1585](https://github.com/shakacode/react_on_rails/pull/1585) by [kotarella1110](https://github.com/kotarella1110)
114
165
  - Removed a workaround in `JsonOutput#escape` for an no-longer supported Rails version. Additionally, removed `Utils.rails_version_less_than_4_1_1`
115
- which was only used in the workaround. [PR 1580](https://github.com/shakacode/react_on_rails/pull/1580) by [wwahammy](https://github.com/wwahammy)
166
+ which was only used in the workaround. [PR 1580](https://github.com/shakacode/react_on_rails/pull/1580) by [wwahammy](https://github.com/wwahammy)
116
167
 
117
168
  #### Added
169
+
118
170
  - Exposed TypeScript all types [PR 1586](https://github.com/shakacode/react_on_rails/pull/1586) by [kotarella1110](https://github.com/kotarella1110)
119
171
 
120
172
  ### [13.4.0] - 2023-07-30
173
+
121
174
  #### Fixed
175
+
122
176
  - Fixed Pack Generation logic during `assets:precompile` if `auto_load_bundle` is `false` & `components_subdirectory` is not set. [PR 1567](https://github.com/shakacode/react_on_rails/pull/1545) by [blackjack26](https://github.com/blackjack26) & [judahmeek](https://github.com/judahmeek).
123
177
 
124
178
  #### Improved
179
+
125
180
  - Improved performance by removing an unnecessary JS eval from Ruby. [PR 1544](https://github.com/shakacode/react_on_rails/pull/1544) by [wyattades](https://github.com/wyattades).
126
181
 
127
182
  #### Added
183
+
128
184
  - Added support for Shakapacker 7 in install generator [PR 1548](https://github.com/shakacode/react_on_rails/pull/1548) by [ahangarha](https://github.com/ahangarha).
129
185
 
130
186
  #### Changed
187
+
131
188
  - Throw error when attempting to redefine ReactOnRails. [PR 1562](https://github.com/shakacode/react_on_rails/pull/1562) by [rubenochiavone](https://github.com/rubenochiavone).
132
189
  - Prevent generating FS-based packs when `component_subdirectory` configuration is not present. [PR 1567](https://github.com/shakacode/react_on_rails/pull/1567) by [blackjack26](https://github.com/blackjack26).
133
190
  - Removed a requirement for autoloaded pack files to be generated as part of CI or deployment separate from initial Shakapacker bundling. [PR 1545](https://github.com/shakacode/react_on_rails/pull/1545) by [judahmeek](https://github.com/judahmeek).
134
191
 
135
-
136
192
  ### [13.3.5] - 2023-05-31
193
+
137
194
  #### Fixed
138
- - Fixed race condition where a react component could attempt to initialize before it had been registered. [PR 1540](https://github.com/shakacode/react_on_rails/pull/1540) by [judahmeek](https://github.com/judahmeek).
195
+
196
+ - Fixed race condition where a React component could attempt to initialize before it had been registered. [PR 1540](https://github.com/shakacode/react_on_rails/pull/1540) by [judahmeek](https://github.com/judahmeek).
139
197
 
140
198
  ### [13.3.4] - 2023-05-23
141
199
 
142
200
  #### Added
201
+
143
202
  - Improved functionality of Filesystem-based pack generation & auto-bundling. Added `make_generated_server_bundle_the_entrypoint` configuration key. [PR 1531](https://github.com/shakacode/react_on_rails/pull/1531) by [judahmeek](https://github.com/judahmeek).
144
203
 
145
204
  #### Removed
205
+
146
206
  - Removed unneeded `HMR=true` from `Procfile.dev` in install template [PR 1537](https://github.com/shakacode/react_on_rails/pull/1537) by [ahangarha](https://github.com/ahangarha).
147
207
 
148
208
  ### [13.3.3] - 2023-03-21
149
209
 
150
210
  #### Fixed
211
+
151
212
  - Fixed bug regarding loading FS-based packs. [PR 1527](https://github.com/shakacode/react_on_rails/pull/1527) by [judahmeek](https://github.com/judahmeek).
152
213
 
153
214
  ### [13.3.2] - 2023-02-24
154
215
 
155
216
  #### Fixed
217
+
156
218
  - Fixed the bug in `bin/dev` and `bin/dev-static` scripts by using `system` instead of `exec` and remove option to pass arguments [PR 1519](https://github.com/shakacode/react_on_rails/pull/1519) by [ahangarha](https://github.com/ahangarha).
157
219
 
158
220
  ### [13.3.1] - 2023-01-30
221
+
159
222
  #### Added
223
+
160
224
  - Optimized `ReactOnRails::TestHelper`'s RSpec integration using `when_first_matching_example_defined`. [PR 1496](https://github.com/shakacode/react_on_rails/pull/1496) by [mcls](https://github.com/mcls).
161
-
225
+
162
226
  #### Fixed
227
+
163
228
  - Fixed bug regarding FS-based packs generation. [PR 1515](https://github.com/shakacode/react_on_rails/pull/1515) by [pulkitkkr](https://github.com/pulkitkkr).
164
229
 
165
230
  ### [13.3.0] - 2023-01-29
231
+
166
232
  #### Fixed
233
+
167
234
  - Fixed pack not found warning while using `react_component` and `react_component_hash` helpers, even when corresponding chunks are present. [PR 1511](https://github.com/shakacode/react_on_rails/pull/1511) by [pulkitkkr](https://github.com/pulkitkkr).
168
- - Fixed FS-based packs generation functionality to trigger pack generation on the creation of a new react component inside `components_subdirectory`. [PR 1506](https://github.com/shakacode/react_on_rails/pull/1506) by [pulkitkkr](https://github.com/pulkitkkr).
235
+ - Fixed FS-based packs generation functionality to trigger pack generation on the creation of a new React component inside `components_subdirectory`. [PR 1506](https://github.com/shakacode/react_on_rails/pull/1506) by [pulkitkkr](https://github.com/pulkitkkr).
169
236
  - Upgrade several JS dependencies to fix security issues. [PR 1514](https://github.com/shakacode/react_on_rails/pull/1514) by [ahangarha](https://github.com/ahangarha).
170
237
 
171
238
  #### Added
239
+
172
240
  - Added `./bin/dev` and `./bin/dev-static` executables to ease and standardize running the dev server. [PR 1491](https://github.com/shakacode/react_on_rails/pull/1491) by [ahangarha](https://github.com/ahangarha).
173
241
 
174
242
  ### [13.2.0] - 2022-12-23
175
-
243
+
176
244
  #### Fixed
245
+
177
246
  - Fix reactOnRailsPageUnloaded when there is no component on the page. Important for apps using both hotwire and react_on_rails. [PR 1498](https://github.com/shakacode/react_on_rails/pull/1498) by [NhanHo](https://github.com/NhanHo).
178
247
  - Fixing wrong type. The throwIfMissing param of getStore should be optional as it defaults to true. [PR 1480](https://github.com/shakacode/react_on_rails/pull/1480) by [wouldntsavezion](https://github.com/wouldntsavezion).
179
248
 
180
249
  #### Added
250
+
181
251
  - Exposed `reactHydrateOrRender` utility via [PR 1481](https://github.com/shakacode/react_on_rails/pull/1481) by [vaukalak](https://github.com/vaukalak).
182
252
 
183
253
  ### [13.1.0] - 2022-08-20
184
254
 
185
255
  #### Improved
256
+
186
257
  - Removed addition of `mini_racer` gem by default. [PR 1453](https://github.com/shakacode/react_on_rails/pull/1453) by [vtamara](https://github.com/vtamara) and [tomdracz](https://github.com/tomdracz).
187
258
 
188
259
  Using `mini_racer` makes most sense when deploying or building in environments that do not have Javascript runtime present. Since `react_on_rails` requires Node.js, there's no reason to override `ExecJS` runtime with `mini_racer`.
@@ -194,62 +265,80 @@ which was only used in the workaround. [PR 1580](https://github.com/shakacode/re
194
265
  - Added file-system-based automatic bundle generation feature. [PR 1455](https://github.com/shakacode/react_on_rails/pull/1455) by [pulkitkkr](https://github.com/pulkitkkr).
195
266
 
196
267
  #### Fixed
268
+
197
269
  - Correctly unmount roots under React 18. [PR 1466](https://github.com/shakacode/react_on_rails/pull/1466) by [alexeyr](https://github.com/alexeyr).
198
270
 
199
271
  - Fixed the `You are importing hydrateRoot from "react-dom" [...] You should instead import it from "react-dom/client"` warning under React 18 ([#1441](https://github.com/shakacode/react_on_rails/issues/1441)). [PR 1460](https://github.com/shakacode/react_on_rails/pull/1460) by [alexeyr](https://github.com/alexeyr).
200
272
 
201
273
  In exchange, you may see a warning like this when building using any version of React below 18:
274
+
202
275
  ```
203
276
  WARNING in ./node_modules/react-on-rails/node_package/lib/reactHydrateOrRender.js19:25-52
204
277
  Module not found: Error: Can't resolve 'react-dom/client' in '/home/runner/work/react_on_rails/react_on_rails/spec/dummy/node_modules/react-on-rails/node_package/lib'
205
278
  @ ./node_modules/react-on-rails/node_package/lib/ReactOnRails.js 34:45-78
206
279
  @ ./client/app/packs/client-bundle.js 5:0-42 32:0-23 35:0-21 59:0-26
207
280
  ```
281
+
208
282
  It can be safely [suppressed](https://webpack.js.org/configuration/other-options/#ignorewarnings) in your Webpack configuration.
209
283
 
210
284
  ### [13.0.2] - 2022-03-09
285
+
211
286
  #### Fixed
287
+
212
288
  - React 16 doesn't support version property, causing problems loading React on Rails. [PR 1435](https://github.com/shakacode/react_on_rails/pull/1435) by [justin808](https://github.com/justin808).
213
289
 
214
290
  ### [13.0.1] - 2022-02-09
291
+
215
292
  #### Improved
293
+
216
294
  - Updated the default generator. [PR 1431](https://github.com/shakacode/react_on_rails/pull/1431) by [justin808](https://github.com/justin808).
217
295
 
218
296
  ### [13.0.0] - 2022-02-08
297
+
219
298
  #### Breaking
299
+
220
300
  - Removed webpacker as a dependency. Add gem Shakapacker to your project, and update your package.json to also use shakapacker.
221
301
 
222
302
  #### Fixed
303
+
223
304
  - Proper throwing of exceptions.
224
305
  - Default configuration better handles test env.
225
306
 
226
307
  ### [12.6.0] - 2022-01-22
227
308
 
228
309
  #### Added
310
+
229
311
  - A `rendering_props_extension` configuration which takes a module with an `adjust_props_for_client_side_hydration` method, which is used to process props differently for server/client if `prerender` is set to `true`. [PR 1413](https://github.com/shakacode/react_on_rails/pull/1413) by [gscarv13](https://github.com/gscarv13) & [judahmeek](https://github.com/judahmeek).
230
312
 
231
313
  ### [12.5.2] - 2021-12-29
314
+
232
315
  #### Fixed
316
+
233
317
  - Usage of config.build_production_command for custom command for production builds fixed. [PR 1415](https://github.com/shakacode/react_on_rails/pull/1415) by [judahmeek](https://github.com/judahmeek).
234
318
 
235
319
  ### [12.5.1] - 2021-12-27
236
320
 
237
321
  #### Fixed
322
+
238
323
  - A fatal server rendering error if running an ReactOnRails >=12.4.0 with ReactOnRails Pro <2.4.0. [PR 1412](https://github.com/shakacode/react_on_rails/pull/1412) by [judahmeek](https://github.com/judahmeek).
239
324
 
240
325
  ### [12.5.0] - 2021-12-26
241
326
 
242
327
  #### Added
328
+
243
329
  - Support for React 18, including the changed SSR API. [PR 1409](https://github.com/shakacode/react_on_rails/pull/1409) by [kylemellander](https://github.com/kylemellander).
244
- - Added webpack configuration files as part of the generator and updated webpacker to version 6. [PR 1404](https://github.com/shakacode/react_on_rails/pull/1404) by [gscarv13](https://github.com/gscarv13).
330
+ - Added Webpack configuration files as part of the generator and updated webpacker to version 6. [PR 1404](https://github.com/shakacode/react_on_rails/pull/1404) by [gscarv13](https://github.com/gscarv13).
245
331
  - Supports Rails 7.
246
332
 
247
333
  #### Changed
248
- - Changed logic of determining the usage of the default rails/webpacker webpack config or a custom command to only check if the config.build_production_command is defined. [PR 1402](https://github.com/shakacode/react_on_rails/pull/1402) by [justin808](https://github.com/justin808) and [gscarv13](https://github.com/gscarv13).
334
+
335
+ - Changed logic of determining the usage of the default rails/webpacker Webpack config or a custom command to only check if the config.build_production_command is defined. [PR 1402](https://github.com/shakacode/react_on_rails/pull/1402) by [justin808](https://github.com/justin808) and [gscarv13](https://github.com/gscarv13).
249
336
  - Minimum required Ruby is 2.7 to match latest rails/webpacker.
250
337
 
251
338
  ### [12.4.0] - 2021-09-22
339
+
252
340
  #### Added
341
+
253
342
  - ScoutAPM tracing support for server rendering [PR 1379](https://github.com/shakacode/react_on_rails/pull/1379) by [justin808](https://github.com/justin808).
254
343
 
255
344
  - Ability to stop React on Rails from modifying or creating the `assets:precompile` task. [PR 1371](https://github.com/shakacode/react_on_rails/pull/1371) by [justin808](https://github.com/justin808). Thanks to [elstgav](https://github.com/elstgav) for [the suggestion](https://github.com/shakacode/react_on_rails/issues/1368)!
@@ -257,30 +346,41 @@ which was only used in the workaround. [PR 1580](https://github.com/shakacode/re
257
346
  - Added the ability to have render functions return a promise to be awaited by React on Rails Pro Node Renderer. [PR 1380](https://github.com/shakacode/react_on_rails/pull/1380) by [judahmeek](https://github.com/judahmeek)
258
347
 
259
348
  ### [12.3.0] - 2021-07-26
349
+
260
350
  #### Added
351
+
261
352
  - Ability to use with Turbo (@hotwired/turbo), as Turbolinks gets obsolete. [PR 1374](https://github.com/shakacode/react_on_rails/pull/1374) by [pgruener](https://github.com/pgruener) and [PR 1377](https://github.com/shakacode/react_on_rails/pull/1377) by [mdesantis](https://github.com/mdesantis).
262
353
 
263
354
  To configure turbo the following option can be set:
264
355
  `ReactOnRails.setOptions({ turbo: true })`
265
356
 
266
357
  ### [12.2.0] - 2021-03-25
358
+
267
359
  #### Added
268
- - Ability to configure server react rendering to throw rather than just logging the error. Useful for
360
+
361
+ - Ability to configure server React rendering to throw rather than just logging the error. Useful for
269
362
  React on Rails Pro Node rendering [PR 1365](https://github.com/shakacode/react_on_rails/pull/1365) by [justin808](https://github.com/justin808).
270
363
 
271
364
  ### [12.1.0] - 2021-03-23
365
+
272
366
  #### Added
367
+
273
368
  - Added the ability to assign a module with a `call` method to `config.build_production_command`. See [the configuration docs](https://www.shakacode.com/react-on-rails/docs/guides/configuration). [PR 1362: Accept custom module for config.build_production_command](https://github.com/shakacode/react_on_rails/pull/1362).
274
369
 
275
370
  #### Fixed
371
+
276
372
  - Stop setting NODE_ENV value during precompile, as it interfered with rails/webpacker's setting of NODE_ENV to production by default. Fixes [#1334](https://github.com/shakacode/react_on_rails/issues/1334). [PR 1356: Don't set NODE_ENV in assets.rake](https://github.com/shakacode/react_on_rails/pull/1356) by [alexrozanski](https://github.com/alexrozanski).
277
373
 
278
374
  ### [12.0.4] - 2020-11-14
375
+
279
376
  #### Fixed
377
+
280
378
  - Install generator now specifies the version. Fixes [React on Rails Generator installs the older npm package #1336](https://github.com/shakacode/react_on_rails/issues/1336). [PR 1338: Fix Generator to use Exact NPM Version](https://github.com/shakacode/react_on_rails/pull/1338) by [justin808](https://github.com/justin808).
281
379
 
282
380
  ### [12.0.3] - 2020-09-20
381
+
283
382
  #### Fixed
383
+
284
384
  - Async script loading optimizes page load speed. With this fix, a bundle
285
385
  can be loaded "async" and a handler function can determine when to hydrate.
286
386
  For an example of this, see the [docs for loadable-components SSR](https://loadable-components.com/docs/server-side-rendering/#4-add-loadableready-client-side).
@@ -288,23 +388,30 @@ which was only used in the workaround. [PR 1580](https://github.com/shakacode/re
288
388
  Loadable-Components is supported by [React on Rails Pro](https://www.shakacode.com/react-on-rails-pro).
289
389
 
290
390
  ### [12.0.2] - 2020-07-09
391
+
291
392
  #### Fixed
393
+
292
394
  - Remove dependency upon Redux for Typescript types. [PR 1323](https://github.com/shakacode/react_on_rails/pull/1323) by [justin808](https://github.com/justin808).
293
395
 
294
396
  ### [12.0.1] - 2020-07-09
397
+
295
398
  #### Fixed
399
+
296
400
  - Changed invocation of webpacker:clean to use a very large number of versions so it does not accidentally delete the server-bundle.js. [PR 1306](https://github.com/shakacode/react_on_rails/pull/1306) by By [justin808](https://github.com/justin808).
297
401
 
298
402
  ### [12.0.0] - 2020-07-08
403
+
299
404
  For upgrade instructions, see [docs/guides/upgrading-react-on-rails.md](https://www.shakacode.com/react-on-rails/docs/guides/upgrading-react-on-rails).
300
405
 
301
406
  #### Major Improvements
407
+
302
408
  1. **React Hooks Support** for top level components
303
409
  2. **Typescript bindings**
304
410
  3. **rails/webpacker** "just works" with React on Rails by default.
305
411
  4. i18n support for generating a JSON file rather than a JS file.
306
412
 
307
413
  #### BREAKING CHANGE
414
+
308
415
  In order to solve the issues regarding React Hooks compatibility, the number of parameters
309
416
  for functions is used to determine if you have a generator function that will get invoked to
310
417
  return a React component, or you are registering a functional React component. Alternately, you can
@@ -316,19 +423,20 @@ See [docs/guides/upgrading-react-on-rails](https://www.shakacode.com/react-on-ra
316
423
  for details.
317
424
 
318
425
  #### Other Updates
319
- * `react_on_rails` fully supports `rails/webpacker`. The example test app in `spec/dummy` was recently converted over to use rails/webpacker v4+. It's a good example of how to leverage rails/webpacker's webpack configuration for server-side rendering.
320
- * Changed the precompile task to use the rails/webpacker one by default
321
- * Updated generators to use React hooks
322
- * Requires the use of rails/webpacker view helpers
323
- * If the webpacker webpack config files exist, then React on Rails will not override the default
324
- assets:precompile setup by rails/webpacker. If you are not using the rails/webpacker setup for webpack,
426
+
427
+ - `react_on_rails` fully supports `rails/webpacker`. The example test app in `spec/dummy` was recently converted over to use rails/webpacker v4+. It's a good example of how to leverage rails/webpacker's Webpack configuration for server-side rendering.
428
+ - Changed the precompile task to use the rails/webpacker one by default
429
+ - Updated generators to use React hooks
430
+ - Requires the use of rails/webpacker view helpers
431
+ - If the webpacker Webpack config files exist, then React on Rails will not override the default
432
+ assets:precompile set up by rails/webpacker. If you are not using the rails/webpacker setup for Webpack,
325
433
  then be sure to remove the JS files inside of config/webpack, like `config/webpack/production.js.`
326
- * Removed **env_javascript_include_tag** and **env_stylesheet_link_tag** as these are replaced by view helpers
434
+ - Removed **env_javascript_include_tag** and **env_stylesheet_link_tag** as these are replaced by view helpers
327
435
  from rails/webpacker
328
- * Removal of support for old Rubies and Rails.
329
- * Removal of config.symlink_non_digested_assets_regex as it's no longer needed with rails/webpacker.
436
+ - Removal of support for old Rubies and Rails.
437
+ - Removal of config.symlink_non_digested_assets_regex as it's no longer needed with rails/webpacker.
330
438
  If any business needs this, we can move the code to a separate gem.
331
- * Added configuration option `same_bundle_for_client_and_server` with default `false` because
439
+ - Added configuration option `same_bundle_for_client_and_server` with default `false` because
332
440
 
333
441
  1. Production applications would typically have a server bundle that differs from the client bundle
334
442
  2. This change only affects trying to use HMR with react_on_rails with rails/webpacker.
@@ -339,7 +447,7 @@ for details.
339
447
  If you are using the **same bundle for client and server rendering**, then set this configuration option
340
448
  to `true`. By [justin808](https://github.com/shakacode/react_on_rails/pull/1240).
341
449
 
342
- * Added support to export locales in JSON format. New option added `i18n_output_format` which allows to
450
+ - Added support to export locales in JSON format. New option added `i18n_output_format` which allows to
343
451
  specify locales format either `JSON` or `JS`. **`JSON` format is now the default.**
344
452
 
345
453
  **Use this config setting to get the old behavior: config.i18n_output_format = 'js'**
@@ -347,31 +455,40 @@ for details.
347
455
  [PR 1271](https://github.com/shakacode/react_on_rails/pull/1271) by [ashgaliyev](https://github.com/ashgaliyev).
348
456
 
349
457
  - Added Typescript definitions to the Node package. By [justin808](https://github.com/justin808) and [judahmeek](https://github.com/judahmeek) in [PR 1287](https://github.com/shakacode/react_on_rails/pull/1287).
350
- - Removed restriction to keep the server bundle in the same directory with the client bundles. Rails/webpacker 4 has an advanced cleanup that will remove any files in the directory of other webpack files. Removing this restriction allows the server bundle to be created in a sibling directory. By [justin808](https://github.com/shakacode/react_on_rails/pull/1240).
458
+ - Removed restriction to keep the server bundle in the same directory with the client bundles. Rails/webpacker 4 has an advanced cleanup that will remove any files in the directory of other Webpack files. Removing this restriction allows the server bundle to be created in a sibling directory. By [justin808](https://github.com/shakacode/react_on_rails/pull/1240).
351
459
 
352
460
  ### [11.3.0] - 2019-05-24
461
+
353
462
  #### Added
463
+
354
464
  - Added method for retrieving any option from `render_options` [PR 1213](https://github.com/shakacode/react_on_rails/pull/1213)
355
- by [ashgaliyev](https://github.com/ashgaliyev).
465
+ by [ashgaliyev](https://github.com/ashgaliyev).
356
466
 
357
467
  - html_options has an option for 'tag' to set the html tag name like this: `html_options: { tag: "span" }`.
358
- [PR 1208](https://github.com/shakacode/react_on_rails/pull/1208) by [tahsin352](https://github.com/tahsin352).
468
+ [PR 1208](https://github.com/shakacode/react_on_rails/pull/1208) by [tahsin352](https://github.com/tahsin352).
359
469
 
360
470
  ### [11.2.2] - 2018-12-24
471
+
361
472
  #### Improved
473
+
362
474
  - rails_context can more easily be called from controller methods. The mandatory param of server_side has been made optional.
363
475
 
364
476
  ### [11.2.1] - 2018-12-06
477
+
365
478
  ## MIGRATION for v11.2
479
+
366
480
  - If using **React on Rails Pro**, upgrade react_on_rails_pro to a version >= 1.3.
367
481
 
368
482
  #### Improved
483
+
369
484
  - To support React v16, updated API for manually calling `ReactOnRails.render(name, props, domNodeId, hydrate)`. Added 3rd @param hydrate Pass truthy to update server rendered html. Default is falsey Any truthy values calls hydrate rather than render. [PR 1159](https://github.com/shakacode/react_on_rails/pull/1159) by [justin808](https://github.com/justin808) and [coopersamuel](https://github.com/coopersamuel).
370
485
 
371
486
  - Enabled the use of webpack-dev-server with Server-side rendering. [PR 1173](https://github.com/shakacode/react_on_rails/pull/1173) by [justin808](https://github.com/justin808) and [judahmeek](https://github.com/judahmeek).
372
487
 
373
488
  #### Changed
489
+
374
490
  - Changed the default for:
491
+
375
492
  ```rb
376
493
  config.raise_on_prerender_error = Rails.env.development?
377
494
  ```
@@ -380,28 +497,37 @@ by [ashgaliyev](https://github.com/ashgaliyev).
380
497
  [PR 1145](https://github.com/shakacode/react_on_rails/pull/1145) by [justin808](https://github.com/justin808).
381
498
 
382
499
  ### 11.2.0 - 2018-12-06
500
+
383
501
  Do not use. Unpublished. Caused by an issue with the release script.
384
502
 
385
503
  ### [11.1.8] - 2018-10-14
386
504
 
387
505
  #### Improved
506
+
388
507
  - Improved tutorial and support for HMR when using `rails/webpacker` for Webpack configuration. [PR 1156](https://github.com/shakacode/react_on_rails/pull/1156) by [justin808](https://github.com/justin808).
389
508
 
390
509
  ### [11.1.7] - 2018-10-10
510
+
391
511
  #### Fixed
512
+
392
513
  - Fixed bug where intl parsing would fail when trying to parse integers or blank entries. by [sepehr500](https://github.com/sepehr500)
393
514
 
394
515
  ### [11.1.6] - 2018-10-05
516
+
395
517
  #### Fixed
518
+
396
519
  - Fix client startup invoking render prematurely, **AGAIN**. Fix additional cases of client startup failing during interactive readyState". Closes [issue #1150](https://github.com/shakacode/react_on_rails/issues/1150). [PR 1152](https://github.com/shakacode/react_on_rails/pull/1152) by [rakelley](https://github.com/rakelley).
397
520
 
398
521
  ### [11.1.5] - 2018-10-03
522
+
399
523
  #### Fixed
400
- - Fix client startup invoking render prematurely. Closes [issue #1150](https://github.com/shakacode/react_on_rails/issues/1150). [PR 1151](https://github.com/shakacode/react_on_rails/pull/1151) by [rakelley](https://github.com/rakelley).
524
+
525
+ - Fix client startup invoking render prematurely. Closes [issue #1150](https://github.com/shakacode/react_on_rails/issues/1150). [PR 1151](https://github.com/shakacode/react_on_rails/pull/1151) by [rakelley](https://github.com/rakelley).
401
526
 
402
527
  ### [11.1.4] - 2018-09-12
403
528
 
404
529
  #### Fixed
530
+
405
531
  - Ignore Arrays in Rails i18n yml files. [PR 1129](https://github.com/shakacode/react_on_rails/pull/1129) by [vcarel](https://github.com/vcarel).
406
532
  - Fix to apply transform-runtime. And work with Babel 6 and 7. (Include revert of [PR 1136](https://github.com/shakacode/react_on_rails/pull/1136)) [PR 1140](https://github.com/shakacode/react_on_rails/pull/1140) by [Ryunosuke Sato](https://github.com/tricknotes).
407
533
  - Upgrade Babel version to 7 [PR 1141](https://github.com/shakacode/react_on_rails/pull/1141) by [Ryunosuke Sato](https://github.com/tricknotes).
@@ -409,62 +535,83 @@ Do not use. Unpublished. Caused by an issue with the release script.
409
535
  ### [11.1.3] - 2018-08-26
410
536
 
411
537
  #### Fixed
538
+
412
539
  - Don't apply babel-plugin-transform-runtime inside react-on-rails to work with babel 7. [PR 1136](https://github.com/shakacode/react_on_rails/pull/1136) by [Ryunosuke Sato](https://github.com/tricknotes).
413
540
  - Add support for webpacker 4 prereleases. [PR 1134](https://github.com/shakacode/react_on_rails/pull/1134) by [Judahmeek](https://github.com/Judahmeek))
414
541
 
415
542
  ### [11.1.2] - 2018-08-18
416
543
 
417
544
  #### Fixed
545
+
418
546
  - Tests now properly exit if the config.build_test_command fails!
419
547
  - Source path for project using Webpacker would default to "app/javascript" even if when the node_modules
420
548
  directory was set to "client". Fix now makes the configuration of this crystal clear.
421
549
  - renamed method RenderOptions.has_random_dom_id? to RenderOptions.random_dom_id? for rubocop rule.
422
- [PR 1133](https://github.com/shakacode/react_on_rails/pull/1133) by [justin808](https://github.com/justin808)
550
+ [PR 1133](https://github.com/shakacode/react_on_rails/pull/1133) by [justin808](https://github.com/justin808)
423
551
 
424
552
  ### [11.1.1] - 2018-08-09
553
+
425
554
  #### Fixed
555
+
426
556
  - `TRUE` was deprecated in ruby 2.4, using `true` instead. [PR 1128](https://github.com/shakacode/react_on_rails/pull/1128) by [Aguardientico](https://github.com/Aguardientico).
427
557
 
428
558
  ### [11.1.0] - 2018-08-07
559
+
429
560
  #### Added
561
+
430
562
  - Add random dom id option. This new global and react_component helper option allows configuring whether or not React on Rails will automatically add a random id to the DOM node ID. [PR 1121](https://github.com/shakacode/react_on_rails/pull/1121) by [justin808](https://github.com/justin808)
431
- * Added configuration option random_dom_id
432
- * Added method RenderOptions has_random_dom_id?
563
+ - Added configuration option random_dom_id
564
+ - Added method RenderOptions has_random_dom_id?
565
+
433
566
  #### Fixed
567
+
434
568
  - Fix invalid warn directive. [PR 1123](https://github.com/shakacode/react_on_rails/pull/1123) by [mustangostang](https://github.com/mustangostang).
435
569
 
436
570
  ### [11.0.10] - 2018-07-22
571
+
437
572
  #### Fixed
573
+
438
574
  - Much better logging of rendering errors when there are lots of props. Only the a 1,000 chars are logged, and the center is indicated to be truncated. [PR 1117](https://github.com/shakacode/react_on_rails/pull/1117) and [PR 1118](https://github.com/shakacode/react_on_rails/pull/1118) by [justin808](https://github.com/justin808).
439
575
  - Properly clearing hydrated stores when server rendering. [PR 1120](https://github.com/shakacode/react_on_rails/pull/1120) by [squadette](https://github.com/squadette).
440
576
 
441
577
  ### [11.0.9] - 2018-06-24
442
- - Handle <script async> for Webpack bundle transparently. Closes [issue #290](https://github.com/shakacode/react_on_rails/issues/290) [PR 1099](https://github.com/shakacode/react_on_rails/pull/1099) by [squadette](https://github.com/squadette). Merged in [PR 1107]( https://github.com/shakacode/react_on_rails/pull/1107).
578
+
579
+ - Handle <script async> for Webpack bundle transparently. Closes [issue #290](https://github.com/shakacode/react_on_rails/issues/290) [PR 1099](https://github.com/shakacode/react_on_rails/pull/1099) by [squadette](https://github.com/squadette). Merged in [PR 1107](https://github.com/shakacode/react_on_rails/pull/1107).
443
580
 
444
581
  ### [11.0.8] - 2018-06-15
582
+
445
583
  #### Fixed
584
+
446
585
  - HashWithIndifferent access for props threw if used for props. [PR 1100](https://github.com/shakacode/react_on_rails/pull/1100) by [justin808](https://github.com/justin808).
447
586
  - Test helper for detecting stale bundles did not properly handle the case of a server-bundle.js without a hash.[PR 1102](https://github.com/shakacode/react_on_rails/pull/1102) by [justin808](https://github.com/justin808).
448
587
  - Fix test helper determination of stale assets. [PR 1093](https://github.com/shakacode/react_on_rails/pull/1093) by [justin808](https://github.com/justin808).
449
588
 
450
589
  #### Changed
590
+
451
591
  - Document how to manually rehydrate XHR-substituted components on client side. [PR 1095](https://github.com/shakacode/react_on_rails/pull/1095) by [hchevalier](https://github.com/hchevalier).
452
592
 
453
593
  ### [11.0.7] - 2018-05-16
594
+
454
595
  #### Fixed
596
+
455
597
  - Fix npm publishing. [PR 1090](https://github.com/shakacode/react_on_rails/pull/1090) by [justin808](https://github.com/justin808).
456
598
 
457
599
  ### [11.0.6] - 2018-05-15
600
+
458
601
  #### Changed
602
+
459
603
  - Even more detailed errors for Honeybadger and Sentry when there's a JSON parse error on server rendering. [PR 1086](https://github.com/shakacode/react_on_rails/pull/1086) by [justin808](https://github.com/justin808).
460
604
 
461
605
  ### [11.0.5] - 2018-05-11
606
+
462
607
  #### Changed
608
+
463
609
  - More detailed errors for Honeybadger and Sentry. [PR 1081](https://github.com/shakacode/react_on_rails/pull/1081) by [justin808](https://github.com/justin808).
464
610
 
465
611
  ### [11.0.4] - 2018-05-3
466
612
 
467
613
  #### Changed
614
+
468
615
  - Throw if configuration.generated_assets_dir specified, and using webpacker, and if that doesn't match the public_output_path. Otherwise, warn if generated_assets_dir is specified
469
616
  - Fix the setup for tests for spec/dummy so they automatically rebuild by correctly setting the source_path in the webpacker.yml
470
617
  - Updated documentation for the testing setup.
@@ -474,48 +621,56 @@ Do not use. Unpublished. Caused by an issue with the release script.
474
621
  ### [11.0.3] - 2018-04-24
475
622
 
476
623
  #### Fixed
624
+
477
625
  - Fixed issue with component script initialization when using react_component_hash. [PR 1071](https://github.com/shakacode/react_on_rails/pull/1071) by [jblasco3](https://github.com/jblasco3).
478
626
 
479
627
  ### [11.0.2] - 2018-04-24
480
628
 
481
629
  #### Fixed
630
+
482
631
  - Server rendering error for React on Rails Pro. [PR 1069](https://github.com/shakacode/react_on_rails/pull/1069) by [justin808](https://github.com/justin808).
483
632
 
484
633
  ### [11.0.1] - 2018-04-23
485
634
 
486
635
  #### Added
636
+
487
637
  - `react_component` allows logging_on_server specified at the component level. [PR 1068](https://github.com/shakacode/react_on_rails/pull/1068) by [justin808](https://github.com/justin808).
488
638
 
489
639
  #### Fixed
640
+
490
641
  - Missing class when throwing some error messages. [PR 1068](https://github.com/shakacode/react_on_rails/pull/1068) by [justin808](https://github.com/justin808).
491
642
 
492
643
  ### [11.0.0] - 2018-04-21
493
644
 
494
645
  ## MIGRATION for v11
646
+
495
647
  - Unused `server_render_method` was removed from the configuration. If you want to use a custom renderer, contact justin@shakacode.com. We have a custom node rendering solution in production for egghead.io.
496
648
  - Removed ReactOnRails::Utils.server_bundle_file_name and ReactOnRails::Utils.bundle_file_name. These are part of the performance features of "React on Rails Pro".
497
649
  - Removed ENV["TRACE_REACT_ON_RAILS"] usage and replacing it with config.trace.
498
650
 
499
651
  #### Enhancements: Better Error Messages, Support for React on Rails Pro
652
+
500
653
  - Tracing (debugging) options are simplified with a single `config.trace` setting that defaults to true for development and false otherwise.
501
654
  - Calls to setTimeout, setInterval, clearTimeout will now always log some message if config.trace is true. Your JavaScript code should not be calling setTimout when server rendering.
502
655
  - Errors raised are of type ReactOnRailsError, so you can see they came from React on Rails for debugging.
503
656
  - Removed ReactOnRails::Utils.server_bundle_file_name and ReactOnRails::Utils.bundle_file_name.
504
657
  - No longer logging the `railsContext` when server logging.
505
658
  - Rails.env is provided in the default railsContext, as suggested in [issue #697](https://github.com/shakacode/react_on_rails/issues/697).
506
- [PR 1065](https://github.com/shakacode/react_on_rails/pull/1065) by [justin808](https://github.com/justin808).
659
+ [PR 1065](https://github.com/shakacode/react_on_rails/pull/1065) by [justin808](https://github.com/justin808).
507
660
 
508
661
  #### Fixes
662
+
509
663
  - More exact version checking. We keep the react_on_rails gem and the react-on-rails node package at
510
- the same exact versions so that we can be sure that the interaction between them is precise.
511
- This is so that if a bug is detected after some update, it's critical that
512
- both the gem and the node package get the updates. This change ensures that the package.json specification does not use a
513
- ~ or ^ as reported in [issue #1062](https://github.com/shakacode/react_on_rails/issues/1062). [PR 1063](https://github.com/shakacode/react_on_rails/pull/1063) by [justin808](https://github.com/justin808).
664
+ the same exact versions so that we can be sure that the interaction between them is precise.
665
+ This is so that if a bug is detected after some update, it's critical that
666
+ both the gem and the node package get the updates. This change ensures that the package.json specification does not use a
667
+ ~ or ^ as reported in [issue #1062](https://github.com/shakacode/react_on_rails/issues/1062). [PR 1063](https://github.com/shakacode/react_on_rails/pull/1063) by [justin808](https://github.com/justin808).
514
668
  - Sprockets: Now use the most recent manifest when creating symlinks. See [issue #1023](https://github.com/shakacode/react_on_rails/issues/1023). [PR 1064](https://github.com/shakacode/react_on_rails/pull/1064) by [justin808](https://github.com/justin808).
515
669
 
516
670
  ### [10.1.4] - 2018-04-11
517
671
 
518
672
  #### Fixed
673
+
519
674
  - Changed i18n parsing to convert ruby i18n argument syntax into FormatJS argument syntax. [PR 1046](https://github.com/shakacode/react_on_rails/pull/1046) by [sepehr500](https://github.com/sepehr500).
520
675
 
521
676
  - Fixed an issue where the spec compiler check would fail if the project path contained spaces. [PR 1045](https://github.com/shakacode/react_on_rails/pull/1045) by [andrewmarkle](https://github.com/andrewmarkle).
@@ -523,32 +678,45 @@ both the gem and the node package get the updates. This change ensures that the
523
678
  - Updated the default `build_production_command` that caused production assets to be built with development settings. [PR 1053](https://github.com/shakacode/react_on_rails/pull/1053) by [Roman Kushnir](https://github.com/RKushnir).
524
679
 
525
680
  ### [10.1.3] - 2018-02-28
681
+
526
682
  #### Fixed
683
+
527
684
  - Improved error reporting on version mismatches between Javascript and Ruby packages. [PR 1025](https://github.com/shakacode/react_on_rails/pull/1025) by [theJoeBiz](https://github.com/squadette).
528
685
 
529
686
  ### [10.1.2] - 2018-02-27
687
+
530
688
  #### Fixed
689
+
531
690
  - Use ReactDOM.hydrate() for hydrating a SSR component if available. ReactDOM.render() has been deprecated for use on SSR components in React 16 and this addresses the warning. [PR 1028](https://github.com/shakacode/react_on_rails/pull/1028) by [theJoeBiz](https://github.com/theJoeBiz).
532
691
 
533
692
  ### [10.1.1] - 2018-01-26
693
+
534
694
  #### Fixed
695
+
535
696
  - Fixed issue with server-rendering error handler: [PR 1020](https://github.com/shakacode/react_on_rails/pull/1020) by [jblasco3](https://github.com/jblasco3).
536
697
 
537
698
  ### [10.1.0] - 2018-01-23
699
+
538
700
  #### Added
701
+
539
702
  - Added 2 cache helpers: ReactOnRails::Utils.bundle_file_name(bundle_name) and ReactOnRails::Utils.server_bundle_file_name
540
- for easy access to the hashed filenames for use in cache keys. [PR 1018](https://github.com/shakacode/react_on_rails/pull/1018) by [justin808](https://github.com/justin808).
703
+ for easy access to the hashed filenames for use in cache keys. [PR 1018](https://github.com/shakacode/react_on_rails/pull/1018) by [justin808](https://github.com/justin808).
541
704
 
542
705
  #### Fixed
543
- - Use redux component in generated redux Hello World example: [PR 1006](https://github.com/shakacode/react_on_rails/pull/1006) by [lewaabahmad](https://github.com/lewaabahmad).
706
+
707
+ - Use Redux component in the generated Redux Hello World example: [PR 1006](https://github.com/shakacode/react_on_rails/pull/1006) by [lewaabahmad](https://github.com/lewaabahmad).
544
708
  - Fixed `Utils.bundle_js_file_path` generating the incorrect path for `manifest.json` in webpacker projects: [Issue #1011](https://github.com/shakacode/react_on_rails/issues/1011) by [elstgav](https://github.com/elstgav)
545
709
 
546
710
  ### [10.0.2] - 2017-11-10
711
+
547
712
  #### Fixed
713
+
548
714
  - Remove unnecessary dependencies from released NPM package: [PR 968](https://github.com/shakacode/react_on_rails/pull/968) by [tricknotes](https://github.com/tricknotes).
549
715
 
550
716
  ### [10.0.1] - 2017-10-28
717
+
551
718
  #### Fixed
719
+
552
720
  - Fixed `react_component_hash` functionality in cases of prerendering errors: [PR 960](https://github.com/shakacode/react_on_rails/pull/960) by [Judahmeek](https://github.com/Judahmeek).
553
721
  - Fix to add missing dependency to run generator spec individually: [PR 962](https://github.com/shakacode/react_on_rails/pull/962) by [tricknotes](https://github.com/tricknotes).
554
722
  - Fixes check for i18n_dir in LocalesToJs returning false when i18n_dir was set. [PR 899](https://github.com/shakacode/react_on_rails/pull/899) by [hakongit](https://github.com/hakongit).
@@ -556,58 +724,78 @@ for easy access to the hashed filenames for use in cache keys. [PR 1018](https:/
556
724
  - Fixed and improved I18n directories checks: [PR 967](https://github.com/shakacode/react_on_rails/pull/967) by [railsme](https://github.com/railsme)
557
725
 
558
726
  ### [10.0.0] - 2017-10-08
727
+
559
728
  #### Created
729
+
560
730
  - Created `react_component_hash` method for react_helmet support.
731
+
561
732
  #### Deprecated
733
+
562
734
  - Deprecated `react_component` functionality for react_helmet support.
563
- To clarify, the method itself is not deprecated, only certain functionality which has been moved to `react_component_hash`
564
- [PR 951](https://github.com/shakacode/react_on_rails/pull/951) by [Judahmeek](https://github.com/Judahmeek).
735
+ To clarify, the method itself is not deprecated, only certain functionality which has been moved to `react_component_hash`
736
+ [PR 951](https://github.com/shakacode/react_on_rails/pull/951) by [Judahmeek](https://github.com/Judahmeek).
565
737
 
566
738
  ### [9.0.3] - 2017-09-20
739
+
567
740
  #### Improved
741
+
568
742
  - Improved comments in generated Procfile.dev-server. [PR 940](https://github.com/shakacode/react_on_rails/pull/940) by [justin808](https://github.com/justin808).
569
743
 
570
744
  ### [9.0.2] - 2017-09-10
745
+
571
746
  #### Fixed
747
+
572
748
  - Improved post install doc comments for generator. [PR 933](https://github.com/shakacode/react_on_rails/pull/933) by [justin808](https://github.com/justin808).
573
749
 
574
750
  ### [9.0.1] - 2017-09-10
575
751
 
576
752
  #### Fixed
753
+
577
754
  - Fixes Rails 3.2 compatability issues. [PR 926](https://github.com/shakacode/react_on_rails/pull/926) by [morozovm](https://github.com/morozovm).
578
755
 
579
756
  ### [9.0.0] - 2017-09-06
580
- Updated React on Rails to depend on [rails/webpacker](https://github.com/rails/webpacker). [PR 908](https://github.com/shakacode/react_on_rails/pull/908) by [justin808](https://github.com/justin808).
581
757
 
758
+ Updated React on Rails to depend on [rails/webpacker](https://github.com/rails/webpacker). [PR 908](https://github.com/shakacode/react_on_rails/pull/908) by [justin808](https://github.com/justin808).
582
759
 
583
760
  #### 9.0 from 8.x. Upgrade Instructions
761
+
584
762
  Moved to [our documentation](https://www.shakacode.com/react-on-rails/docs/guides/upgrading-react-on-rails#upgrading-to-version-9).
585
763
 
586
764
  ### [8.0.7] - 2017-08-16
765
+
587
766
  #### Fixed
767
+
588
768
  - Fixes generator bug by keeping blank line at top in case existing .gitignore does not end in a newline. [#916](https://github.com/shakacode/react_on_rails/pull/916) by [justin808](https://github.com/justin808).
589
769
 
590
770
  ### [8.0.6] - 2017-07-19
771
+
591
772
  #### Fixed
773
+
592
774
  - Fixes server rendering when using a CDN. Server rendering would try to fetch a file with the "asset_host". This change updates the webpacker_lite dependency to 2.1.0 which has a new helper `pack_path`. [#901](https://github.com/shakacode/react_on_rails/pull/901) by [justin808](https://github.com/justin808). Be sure to update webpacker_lite to 2.1.0.
593
- - The package.json file created by the generator now creates minified javascript production builds by default. This was done by adding the -p flag to webpack on the build:production script. [#895](https://github.com/shakacode/react_on_rails/pull/895) by [serodriguez68 ](https://github.com/serodriguez68)
775
+ - The package.json file created by the generator now creates minified javascript production builds by default. This was done by adding the -p flag to Webpack on the build:production script. [#895](https://github.com/shakacode/react_on_rails/pull/895) by [serodriguez68 ](https://github.com/serodriguez68)
594
776
  - Fixes GitUtils.uncommitted_changes? throwing an error when called in an environment without Git, and allows install generator to be run successfully with `--ignore-warnings` [#878](https://github.com/shakacode/react_on_rails/pull/878) by [jasonblalock](https://github.com/jasonblalock).
595
777
 
596
778
  ## [8.0.5] - 2017-07-04
779
+
597
780
  #### Fixed
598
- - Corrects `devBuild` value for webpack production build from webpackConfigLoader. [#877](https://github.com/shakacode/react_on_rails/pull/877) by [chenqingspring](https://github.com/chenqingspring).
599
- - Remove contentBase deprecation warning message. [#878](https://github.com/shakacode/react_on_rails/pull/878) by [ened ](https://github.com/ened).
600
- - Removes invalid reference to _railsContext in the generated files. [#886](https://github.com/shakacode/react_on_rails/pull/886) by [justin808](https://github.com/justin808).
601
- - All tests run against Rails 5.1.2
602
781
 
603
- *Note: 8.0.4 skipped.*
782
+ - Corrects `devBuild` value for webpack production build from webpackConfigLoader. [#877](https://github.com/shakacode/react_on_rails/pull/877) by [chenqingspring](https://github.com/chenqingspring).
783
+ - Remove contentBase deprecation warning message. [#878](https://github.com/shakacode/react_on_rails/pull/878) by [ened ](https://github.com/ened).
784
+ - Removes invalid reference to \_railsContext in the generated files. [#886](https://github.com/shakacode/react_on_rails/pull/886) by [justin808](https://github.com/justin808).
785
+ - All tests run against Rails 5.1.2
786
+
787
+ _Note: 8.0.4 skipped._
604
788
 
605
789
  ## [8.0.3] - 2017-06-19
790
+
606
791
  #### Fixed
792
+
607
793
  - Ruby 2.1 issue due to `<<~` as reported in [issue #870](https://github.com/shakacode/react_on_rails/issues/870). [#867](https://github.com/shakacode/react_on_rails/pull/867) by [justin808](https://github.com/justin808)
608
794
 
609
795
  ## [8.0.2] - 2017-06-04
796
+
610
797
  #### Fixed
798
+
611
799
  - Any failure in webpack to build test files quits tests.
612
800
  - Fixed a Ruby 2.4 potential crash which could cause a crash due to pathname change in Ruby 2.4.
613
801
  - CI Improvements:
@@ -618,10 +806,13 @@ Moved to [our documentation](https://www.shakacode.com/react-on-rails/docs/guide
618
806
  - [#862](https://github.com/shakacode/react_on_rails/pull/862) by [justin808](https://github.com/justin808)
619
807
 
620
808
  ## [8.0.1] - 2017-05-30
809
+
621
810
  #### Fixed
811
+
622
812
  - Generator no longer modifies `assets.rb`. [#859](https://github.com/shakacode/react_on_rails/pull/859) by [justin808](https://github.com/justin808)
623
813
 
624
814
  ## [8.0.0] - 2017-05-29
815
+
625
816
  - Generators and full support for [webpacker_lite](https://github.com/shakacode/webpacker_lite)
626
817
  - No breaking changes to move to 8.0.0 other than the default for this setting changed to nil. If you depended on the default of this setting and are using the asset pipeline (and not webpacker_lite), then add this to your `config/initializers/react_on_rails.rb`:
627
818
  ```
@@ -631,21 +822,26 @@ Moved to [our documentation](https://www.shakacode.com/react-on-rails/docs/guide
631
822
  - For a simple example of the webpacker_lite setup, run the basic generator.
632
823
 
633
824
  ## [8.0.0-beta.3] - 2017-05-27
825
+
634
826
  #### Changed
827
+
635
828
  - Major updates for WebpackerLite 2.0.2. [#844](https://github.com/shakacode/react_on_rails/pull/845) by [justin808](https://github.com/justin808) with help from ](https://github.com/robwise)
636
829
  - Logging no longer occurs when trace is turned to false. [#845](https://github.com/shakacode/react_on_rails/pull/845) by [conturbo](https://github.com/Conturbo)
637
830
 
638
831
  ## [8.0.0-beta.2] - 2017-05-08
639
832
 
640
833
  #### Changed
834
+
641
835
  Removed unnecessary values in default paths.yml files for generators. [#834](https://github.com/shakacode/react_on_rails/pull/834) by [justin808](https://github.com/justin808).
642
836
 
643
837
  ## [8.0.0-beta.1] - 2017-05-03
644
838
 
645
839
  #### Added
840
+
646
841
  Support for WebpackerLite in the generators. [#822](https://github.com/shakacode/react_on_rails/pull/822) by [kaizencodes](https://github.com/kaizencodes) and [justin808](https://github.com/justin808).
647
842
 
648
843
  #### Changed
844
+
649
845
  Breaking change is that the default value of symlink_non_digested_assets_regex has changed from this
650
846
  old value to nil. This is a breaking change if you didn't have this value set in your
651
847
  config/initializers/react_on_rails.rb file and you need this because you're using webpack's CSS
@@ -656,90 +852,119 @@ symlink_non_digested_assets_regex: /\.(png|jpg|jpeg|gif|tiff|woff|ttf|eot|svg|ma
656
852
  ```
657
853
 
658
854
  ## [7.0.4] - 2017-04-27
855
+
659
856
  - Return empty json when nil in json_safe_and_pretty [#824](https://github.com/shakacode/react_on_rails/pull/824) by [dzirtusss](https://github.com/dzirtusss)
660
857
 
661
858
  ## [7.0.3] - 2017-04-27
859
+
662
860
  Same as 7.0.1.
663
861
 
664
862
  ## 7.0.2 - 2017-04-27
665
- *Accidental release of beta gem here*
863
+
864
+ _Accidental release of beta gem here_
666
865
 
667
866
  ## [7.0.1] - 2017-04-27
867
+
668
868
  #### Fixed
869
+
669
870
  - Fix to handle nil values in json_safe_and_pretty [#823](https://github.com/shakacode/react_on_rails/pull/823) by [dzirtusss](https://github.com/dzirtusss)
670
871
 
671
872
  ## [7.0.0] - 2017-04-25
873
+
672
874
  #### Changed
875
+
673
876
  - Any version differences in gem and node package for React on Rails throw an error [#821](https://github.com/shakacode/react_on_rails/pull/821) by [justin808](https://github.com/justin808)
674
877
 
675
878
  #### Fixed
879
+
676
880
  - Fixes serious performance regression when using String props for rendering. [#821](https://github.com/shakacode/react_on_rails/pull/821) by [justin808](https://github.com/justin808)
677
881
 
678
882
  ## [6.10.1] - 2017-04-23
883
+
679
884
  #### Fixed
885
+
680
886
  - Improve json conversion with tests and support for older Rails 3.x. [#787](https://github.com/shakacode/react_on_rails/pull/787) by [cheremukhin23](https://github.com/cheremukhin23) and [Ynote](https://github.com/Ynote).
681
887
 
682
888
  ## [6.10.0] - 2017-04-13
683
889
 
684
890
  #### Added
891
+
685
892
  - Add an ability to return multiple HTML strings in a `Hash` as a result of `react_component` method call. Allows to build `<head>` contents with [React Helmet](https://github.com/nfl/react-helmet). [#800](https://github.com/shakacode/react_on_rails/pull/800) by [udovenko](https://github.com/udovenko).
686
893
 
687
894
  #### Fixed
895
+
688
896
  - Fix PropTypes, createClass deprecation warnings for React 15.5.x. [#804](https://github.com/shakacode/react_on_rails/pull/804) by [udovenko ](https://github.com/udovenko).
689
897
 
690
898
  ## [6.9.3] - 2017-04-03
691
899
 
692
900
  #### Fixed
901
+
693
902
  - Removed call of to_json on strings when formatting props. [#791](https://github.com/shakacode/react_on_rails/pull/791) by [justin808](https://github.com/justin808).
694
903
 
695
904
  ## [6.9.2] - 2017-04-02
696
905
 
697
906
  #### Changed
907
+
698
908
  - Update version_checker.rb to `logger.error` rather than `logger.warn` for gem/npm version mismatch. [#788](https://github.com/shakacode/react_on_rails/issues/788) by [justin808](https://github.com/justin808).
699
909
 
700
910
  #### Fixed
911
+
701
912
  - Remove pretty formatting of JSON in development. [#789](https://github.com/shakacode/react_on_rails/pull/789) by [justin808](https://github.com/justin808)
702
913
  - Clear hydrated stores with each server rendered block. [#785](https://github.com/shakacode/react_on_rails/pull/785) by [udovenko](https://github.com/udovenko)
703
914
 
704
915
  ## [6.9.1] - 2017-03-30
705
916
 
706
917
  #### Fixed
918
+
707
919
  - Fixes Crash in Development for String Props. [#784](https://github.com/shakacode/react_on_rails/issues/784) by [justin808](https://github.com/justin808).
708
920
 
709
921
  ## [6.9.0] - 2017-03-29
710
922
 
711
923
  #### Fixed
924
+
712
925
  - Fixed error in the release script. [#767](https://github.com/shakacode/react_on_rails/issues/767) by [isolo](https://github.com/isolo).
713
926
 
714
927
  #### Changed
928
+
715
929
  - Use <script type="application/json"> for props and store instead of hidden div. [#775] (https://github.com/shakacode/react_on_rails/pull/775) by [cheremukhin23](https://github.com/cheremukhin23).
716
930
 
717
931
  #### Added
932
+
718
933
  - Add option to specify i18n_yml_dir in order to include only subset of locale files when generating translations.js & default.js for react-intl.
719
- [#777](https://github.com/shakacode/react_on_rails/pull/777) by [danijel](https://github.com/danijel).
934
+ [#777](https://github.com/shakacode/react_on_rails/pull/777) by [danijel](https://github.com/danijel).
720
935
 
721
936
  ## [6.8.2] - 2017-03-24
937
+
722
938
  #### Fixed
939
+
723
940
  - Change webpack output path to absolute and update webpack to version ^2.3.1. [#771](https://github.com/shakacode/react_on_rails/pull/771) by [cheremukhin23](https://github.com/cheremukhin23).
724
941
 
725
942
  ## [6.8.1] - 2017-03-21
943
+
726
944
  #### Fixed
727
- - Fixed error "The node you're attempting to unmount was rendered by another copy of React." [#706](https://github.com/shakacode/react_on_rails/issues/706) when navigating to cached page using Turbolinks [#763](https://github.com/shakacode/react_on_rails/pull/763) by [szyablitsky](https://github.com/szyablitsky).
945
+
946
+ - Fixed error "The node you're attempting to unmount was rendered by another copy of React." [#706](https://github.com/shakacode/react_on_rails/issues/706) when navigating to cached page using Turbolinks [#763](https://github.com/shakacode/react_on_rails/pull/763) by [szyablitsky](https://github.com/szyablitsky).
728
947
 
729
948
  ## [6.8.0] - 2017-03-06
949
+
730
950
  ## Added
951
+
731
952
  - Converted to Webpack v2 for generators, tests, and all example code. [#742](https://github.com/shakacode/react_on_rails/pull/742) by [justin808](https://github.com/justin808).
732
953
 
733
954
  ## [6.7.2] - 2017-03-05
955
+
734
956
  #### Improved
957
+
735
958
  - Improve i18n Integration with a better error message if the value of the i18n directory is invalid. [#748](https://github.com/shakacode/react_on_rails/pull/748) by [justin808](https://github.com/justin808).
736
959
 
737
960
  ## [6.7.1] - 2017-02-28
961
+
738
962
  No changes other than a test fix.
739
963
 
740
964
  ## [6.7.0] - 2017-02-28
741
965
 
742
966
  #### IMPORTANT
967
+
743
968
  - If you installed 6.6.0, you will need to comment out the line matching i18n_dir unless you are using this feature. 6.7.1 will give you an error like:
744
969
 
745
970
  ```
@@ -753,72 +978,99 @@ config.i18n_dir = Rails.root.join("client", "app", "libs", "i18n")
753
978
  ```
754
979
 
755
980
  #### Added
981
+
756
982
  - Allow using rake task to generate javascript locale files. The test helper automatically creates the localization files when needed. [#717](https://github.com/shakacode/react_on_rails/pull/717) by [JasonYCHuang](https://github.com/JasonYCHuang).
757
983
 
758
984
  #### Fixed
985
+
759
986
  - Upgrade Rails to 4.2.8 to fix security vulnerabilities in 4.2.5. [#735](https://github.com/shakacode/react_on_rails/pull/735) by [hrishimittal](https://github.com/hrishimittal).
760
987
  - Fix spec failing due to duplicate component. [#734](https://github.com/shakacode/react_on_rails/pull/734) by [hrishimittal](https://github.com/hrishimittal).
761
988
 
762
989
  ## [6.6.0] - 2017-02-18
990
+
763
991
  #### Added
992
+
764
993
  - Switched to yarn! [#715](https://github.com/shakacode/react_on_rails/pull/715) by [squadette](https://github.com/squadette).
765
994
 
766
995
  ## [6.5.1] - 2017-02-11
996
+
767
997
  #### Fixed
998
+
768
999
  - Allow using gem without sprockets. [#671](https://github.com/shakacode/react_on_rails/pull/671) by [fc-arny](https://github.com/fc-arny).
769
1000
  - Fixed issue [#706](https://github.com/shakacode/react_on_rails/issues/706) with "flickering" components when they are unmounted too early [#709](https://github.com/shakacode/react_on_rails/pull/709) by [szyablitsky](https://github.com/szyablitsky).
770
1001
  - Small formatting fix for errors [#703](https://github.com/shakacode/react_on_rails/pull/703) by [justin808](https://github.com/justin808).
771
1002
 
772
1003
  ## [6.5.0] - 2017-01-31
1004
+
773
1005
  #### Added
1006
+
774
1007
  - Allow generator function to return Object with property `renderedHtml` (already could return Object with props `redirectLocation, error`) rather than a React component or a function that returns a React component. One reason to use a generator function is that sometimes in server rendering, specifically with React Router v4, you need to return the result of calling ReactDOMServer.renderToString(element). [#689](https://github.com/shakacode/react_on_rails/issues/689) by [justin808](https://github.com/justin808).
775
1008
 
776
1009
  #### Fixed
1010
+
777
1011
  - Fix incorrect "this" references of Node.js SSR [#690](https://github.com/shakacode/react_on_rails/issues/689) by [nostophilia](https://github.com/nostophilia).
778
1012
 
779
1013
  ## [6.4.2] - 2017-01-17
1014
+
780
1015
  #### Fixed
1016
+
781
1017
  - Added OS detection for install generator, system call for Windows and unit-tests for it. [#666](https://github.com/shakacode/react_on_rails/pull/666) by [GeorgeGorbanev](https://github.com/GeorgeGorbanev).
782
1018
 
783
1019
  ## [6.4.1] - 2017-1-17
1020
+
784
1021
  No changes.
785
1022
 
786
1023
  ## [6.4.0] - 2017-1-12
787
1024
 
788
1025
  #### Possible Breaking Change
1026
+
789
1027
  - Since foreman is no longer a dependency of the React on Rails gem, please run `gem install foreman`. If you are using rvm, you may wish to run `rvm @global do gem install foreman` to install foreman for all your gemsets.
790
1028
 
791
1029
  #### Fixed
1030
+
792
1031
  - Removed foreman as a dependency. [#678](https://github.com/shakacode/react_on_rails/pull/678) by [x2es](https://github.com/x2es).
793
1032
 
794
1033
  #### Added
795
- - Automatically generate __i18n__ javascript files for `react-intl` when the serve starts up. [#642](https://github.com/shakacode/react_on_rails/pull/642) by [JasonYCHuang](https://github.com/JasonYCHuang).
1034
+
1035
+ - Automatically generate **i18n** javascript files for `react-intl` when the serve starts up. [#642](https://github.com/shakacode/react_on_rails/pull/642) by [JasonYCHuang](https://github.com/JasonYCHuang).
796
1036
 
797
1037
  ## [6.3.5] - 2017-1-6
1038
+
798
1039
  #### Fixed
799
- - The redux generator now creates a HelloWorld component that uses redux rather than local state. [#669](https://github.com/shakacode/react_on_rails/issues/669) by [justin808](https://github.com/justin808).
1040
+
1041
+ - The Redux generator now creates a HelloWorld component that uses redux rather than local state. [#669](https://github.com/shakacode/react_on_rails/issues/669) by [justin808](https://github.com/justin808).
800
1042
 
801
1043
  ## [6.3.4] - 2016-12-25
1044
+
802
1045
  ##### Fixed
1046
+
803
1047
  - Disable Turbolinks support when not supported. [#650](https://github.com/shakacode/react_on_rails/pull/650) by [ka2n](https://github.com/ka2n).
804
1048
 
805
1049
  ## [6.3.3] - 2016-12-25
1050
+
806
1051
  ##### Fixed
1052
+
807
1053
  - By using the hook on `turbolinks:before-visit` to unmount the components, we can ensure that components are unmounted even when Turbolinks cache is disabled. Previously, we used `turbolinks:before-cache` event hook. [#644](https://github.com/shakacode/react_on_rails/pull/644) by [volkanunsal](https://github.com/volkanunsal).
808
1054
  - Added support for Ruby 2.0 [#651](https://github.com/shakacode/react_on_rails/pull/651) by [bbonamin](https://github.com/bbonamin).
809
1055
 
810
1056
  ## [6.3.2] - 2016-12-5
1057
+
811
1058
  ##### Fixed
1059
+
812
1060
  - The `react_component` method was raising a `NameError` when `ReactOnRailsHelper` was included in a plain object. [#636](https://github.com/shakacode/react_on_rails/pull/636) by [jtibbertsma](https://github.com/jtibbertsma).
813
1061
  - "Node parse error" for node server rendering. [#641](https://github.com/shakacode/react_on_rails/pull/641) by [alleycat-at-git](https://github.com/alleycat-at-git) and [rocLv](https://github.com/rocLv)
814
1062
  - Better error handling when the react-on-rails node package entry is missing.[#602](https://github.com/shakacode/react_on_rails/pull/602) by [benjiwheeler](https://github.com/benjiwheeler).
815
1063
 
816
1064
  ## [6.3.1] - 2016-11-30
1065
+
817
1066
  ##### Changed
1067
+
818
1068
  - Improved generator post-install help messages. [#631](https://github.com/shakacode/react_on_rails/pull/631) by [justin808](https://github.com/justin808).
819
1069
 
820
1070
  ## [6.3.0] - 2016-11-30
1071
+
821
1072
  ##### Changed
1073
+
822
1074
  - Modified register API to allow registration of renderers, allowing a user to manually render their app to the DOM. This allows for code splitting and deferred loading. [#581](https://github.com/shakacode/react_on_rails/pull/581) by [jtibbertsma](https://github.com/jtibbertsma).
823
1075
 
824
1076
  - Updated Basic Generator & Linters. Examples are simpler. [#624](https://github.com/shakacode/react_on_rails/pull/624) by [Judahmeek](https://github.com/Judahmeek).
@@ -828,65 +1080,88 @@ No changes.
828
1080
  - Don't assume ActionMailer is available. [#608](https://github.com/shakacode/react_on_rails/pull/608) by [tuzz](https://github.com/tuzz).
829
1081
 
830
1082
  ## [6.2.1] - 2016-11-19
1083
+
831
1084
  - Removed unnecessary passing of context in the HelloWorld Container example and basic generator. [#612](https://github.com/shakacode/react_on_rails/pull/612) by [justin808](https://github.com/justin808)
832
1085
 
833
1086
  - Turbolinks 5 bugfix to use `before-cache`, not `before-render`. [#611](https://github.com/shakacode/react_on_rails/pull/611) by [volkanunsal](https://github.com/volkanunsal).
834
1087
 
835
1088
  ## [6.2.0] - 2016-11-19
1089
+
836
1090
  ##### Changed
837
- - Updated the generator templates to reflect current best practices, especially for the redux version. [#584](https://github.com/shakacode/react_on_rails/pull/584) by [nostophilia](https://github.com/nostophilia).
1091
+
1092
+ - Updated the generator templates to reflect current best practices, especially for the Redux version. [#584](https://github.com/shakacode/react_on_rails/pull/584) by [nostophilia](https://github.com/nostophilia).
838
1093
 
839
1094
  ## [6.1.2] - 2016-10-24
1095
+
840
1096
  ##### Fixed
1097
+
841
1098
  - Added compatibility with older manifest.yml files produced by Rails 3 Sprockets when symlinking digested assets during precompilation [#566](https://github.com/shakacode/react_on_rails/pull/566) by [etripier](https://github.com/etripier).
842
1099
 
843
1100
  ## [6.1.1] - 2016-09-09
1101
+
844
1102
  ##### Fixed
1103
+
845
1104
  - React on Rails was incorrectly failing to create symlinks when a file existed in the location for the new symlink. [#491](https://github.com/shakacode/react_on_rails/pull/541) by [robwise ](https://github.com/robwise) and [justin808](https://github.com/justin808).
846
1105
 
847
1106
  ## [6.1.0] - 2016-08-21
848
1107
 
849
1108
  ##### Added
1109
+
850
1110
  - Node option for installer added as alternative for server rendering [#469](https://github.com/shakacode/react_on_rails/pull/469) by [jbhatab](https://github.com/jbhatab).
851
1111
  - Server rendering now supports contexts outside of browser rendering, such as ActionMailer templates [#486](https://github.com/shakacode/react_on_rails/pull/486) by [eacaps](https://github.com/eacaps).
852
1112
  - Added authenticityToken() and authenticityHeaders() javascript helpers for easier use when working with CSRF protection tag generated by Rails [#517](https://github.com/shakacode/react_on_rails/pull/517) by [dzirtusss](https://github.com/dzirtusss).
853
1113
  - Updated JavaScript error handling on the client side. Errors in client rendering now pass through to the browser [#521](https://github.com/shakacode/react_on_rails/pull/521) by [dzirtusss](https://github.com/dzirtusss).
854
1114
 
855
1115
  ##### Fixed
1116
+
856
1117
  - React on Rails now correctly parses single-digit version strings from package.json [#491](https://github.com/shakacode/react_on_rails/pull/491) by [samphilipd ](https://github.com/samphilipd).
857
1118
  - Fixed assets symlinking to correctly use filenames with spaces. Beginning in [#510](https://github.com/shakacode/react_on_rails/pull/510), ending in [#513](https://github.com/shakacode/react_on_rails/pull/513) by [dzirtusss](https://github.com/dzirtusss).
858
1119
  - Check encoding of request's original URL and force it to UTF-8 [#527](https://github.com/shakacode/react_on_rails/pull/527) by [lucke84](https://github.com/lucke84)
859
1120
 
860
1121
  ## [6.0.5] - 2016-07-11
1122
+
861
1123
  ##### Added
862
- - Added better error messages to avoid issues with shared redux stores [#470](https://github.com/shakacode/react_on_rails/pull/470) by [justin808](https://github.com/justin808).
1124
+
1125
+ - Added better error messages to avoid issues with shared Redux stores [#470](https://github.com/shakacode/react_on_rails/pull/470) by [justin808](https://github.com/justin808).
863
1126
 
864
1127
  ## [6.0.4] - 2016-06-13
1128
+
865
1129
  ##### Fixed
866
- - Added polyfill for clearTimeout which is used by babel-polyfill [#451](https://github.com/shakacode/react_on_rails/pull/451) by [martyphee](https://github.com/martyphee)
1130
+
1131
+ - Added a polyfill for `clearTimeout` which is used by `babel-polyfill` [#451](https://github.com/shakacode/react_on_rails/pull/451) by [martyphee](https://github.com/martyphee)
867
1132
 
868
1133
  ## [6.0.3] - 2016-06-07
1134
+
869
1135
  ##### Fixed
1136
+
870
1137
  - Added assets symlinking support on Heroku [#446](https://github.com/shakacode/react_on_rails/pull/446) by [Alexey Karasev](https://github.com/alleycat-at-git).
871
1138
 
872
1139
  ## [6.0.2] - 2016-06-06
1140
+
873
1141
  ##### Fixed
1142
+
874
1143
  - Fix collisions in ids of DOM nodes generated by `react_component` by indexing in using a UUID rather than an auto-increment value. This means that it should be overridden using the `id` parameter of `react_component` if one wants to generate a predictable id (_e.g._ for testing purpose). See [Issue #437](https://github.com/shakacode/react_on_rails/issues/437). Fixed in [#438](https://github.com/shakacode/react_on_rails/pull/438) by [Michael Baudino](https://github.com/michaelbaudino).
875
1144
 
876
1145
  ## [6.0.1] - 2016-05-27
1146
+
877
1147
  ##### Fixed
1148
+
878
1149
  - Allow for older version of manifest.json for older versions of sprockets. See [Issue #435](https://github.com/shakacode/react_on_rails/issues/435). Fixed in [#436](https://github.com/shakacode/react_on_rails/pull/436) by [alleycat-at-git](https://github.com/alleycat-at-git).
879
1150
 
880
1151
  ## [6.0.0] - 2016-05-25
1152
+
881
1153
  ##### Breaking Changes
1154
+
882
1155
  - Added automatic compilation of assets at precompile is now done by ReactOnRails. Thus, you don't need to provide your own `assets.rake` file that does the precompilation.
883
1156
  [#398](https://github.com/shakacode/react_on_rails/pull/398) by [robwise](https://github.com/robwise), [jbhatab](https://github.com/jbhatab), and [justin808](https://github.com/justin808).
884
1157
  - **Migration to v6**
1158
+
885
1159
  - Do not run the generator again if you've already run it.
886
1160
 
887
- - See [shakacode/react-webpack-rails-tutorial/pull/287](https://github.com/shakacode/react-webpack-rails-tutorial/pull/287) for an example of upgrading from v5.
1161
+ - See [shakacode/react-webpack-rails-tutorial/pull/287](https://github.com/shakacode/react-webpack-rails-tutorial/pull/287) for an example of upgrading from v5.
888
1162
 
889
1163
  - To configure the asset compilation you can either
1164
+
890
1165
  1. Specify a `config/react_on_rails` setting for `build_production_command` to be nil to turn this feature off.
891
1166
  2. Specify the script command you want to run to build your production assets, and remove your `assets.rake` file.
892
1167
 
@@ -895,6 +1170,7 @@ No changes.
895
1170
  - See [shakacode/react-webpack-rails-tutorial #287](https://github.com/shakacode/react-webpack-rails-tutorial/pull/287/files) for an upgrade example. The PR has a few comments on the upgrade.
896
1171
 
897
1172
  Here is the addition to the generated config file:
1173
+
898
1174
  ```ruby
899
1175
  # This configures the script to run to build the production assets by webpack. Set this to nil
900
1176
  # if you don't want react_on_rails building this file for you.
@@ -907,48 +1183,61 @@ Here is the addition to the generated config file:
907
1183
  ```
908
1184
 
909
1185
  ##### Fixed
1186
+
910
1187
  - Fixed errors when server rendered props contain \u2028 or \u2029 characters [#375](https://github.com/shakacode/react_on_rails/pull/375) by [mariusandra](https://github.com/mariusandra)
911
1188
  - Fixed "too early unmount" which caused problems with Turbolinks 5 not updating the screen [#425](https://github.com/shakacode/react_on_rails/pull/425) by [szyablitsky](https://github.com/szyablitsky)
912
1189
 
913
1190
  ##### Added
1191
+
914
1192
  - Experimental ability to use node.js process for server rendering. See [#380](https://github.com/shakacode/react_on_rails/pull/380) by [alleycat-at-git](https://github.com/alleycat-at-git).
915
1193
  - Non-digested version of assets in public folder [#413](https://github.com/shakacode/react_on_rails/pull/413) by [alleycat-at-git](https://github.com/alleycat-at-git).
916
1194
  - Cache client/node_modules directory to prevent Heroku from reinstalling all modules from scratch [#324](https://github.com/shakacode/react_on_rails/pull/324) by [modosc](https://github.com/modosc).
917
1195
  - ReactOnRails.reactOnRailsPageLoaded() is exposed in case one needs to call this manually and information on async script loading added. See [#315](https://github.com/shakacode/react_on_rails/pull/315) by [SqueezedLight](https://github.com/SqueezedLight).
918
1196
 
919
1197
  ##### Changed
1198
+
920
1199
  - [#398](https://github.com/shakacode/react_on_rails/pull/398) by [robwise](https://github.com/robwise), [jbhatab](https://github.com/jbhatab), and [justin808](https://github.com/justin808) contains:
921
1200
  - Only one webpack config is generated for server and client config. Package.json files were changed to reflect this.
922
1201
  - Added npm_build_test_command to allow developers to change what npm command is automatically run from rspec.
923
1202
  - Replace URI with Addressable gem. See [#405](https://github.com/shakacode/react_on_rails/pull/405) by [lucke84](https://github.com/lucke84)
924
1203
 
925
1204
  ##### Removed
1205
+
926
1206
  - [#398](https://github.com/shakacode/react_on_rails/pull/398) by [robwise](https://github.com/robwise), [jbhatab](https://github.com/jbhatab), and [justin808](https://github.com/justin808) contains:
927
1207
  - Server rendering is no longer an option in the generator and is always accessible.
928
1208
  - Removed lodash, jquery, and loggerMiddleware from the generated code.
929
1209
  - Removed webpack watch check for test helper automatic compilation.
930
1210
 
931
1211
  ## [5.2.0] - 2016-04-08
1212
+
932
1213
  ##### Added
1214
+
933
1215
  - Support for React 15.0 to react_on_rails. See [#379](https://github.com/shakacode/react_on_rails/pull/379) by [brucek](https://github.com/brucek).
934
1216
  - Support for Node.js server side rendering. See [#380](https://github.com/shakacode/react_on_rails/pull/380) by [alleycat](https://github.com/alleycat-at-git) and [doc](https://www.shakacode.com/react-on-rails/docs/react-on-rails-pro/react-on-rails-pro#pro-integration-with-nodejs-for-server-rendering)
935
1217
 
936
1218
  ##### Removed
1219
+
937
1220
  - Generator removals to simplify installer. See [#364](https://github.com/shakacode/react_on_rails/pull/364) by [jbhatab](https://github.com/jbhatab).
938
1221
  - Removed options for heroku, boostrap, and the linters from generator.
939
1222
  - Removed install for the Webpack Dev Server, as we can now do hot reloading with Rails, so the complexity of this feature is not justified. Nevertheless, the setup of React on Rails still supports this setup, just not with the generator.
940
1223
  - Documentation added for removed installer options.
941
1224
 
942
1225
  ## [5.1.1] - 2016-04-04
1226
+
943
1227
  ##### Fixed
1228
+
944
1229
  - Security Fixes: Address failure to sanitize console messages when server rendering and displaying in the browser console. See [#366](https://github.com/shakacode/react_on_rails/pull/366) and [#370](https://github.com/shakacode/react_on_rails/pull/370) by [justin808](https://github.com/justin808)
945
1230
 
946
1231
  ##### Added
1232
+
947
1233
  - railsContext includes the port number and a boolean if the code is being run on the server or client.
948
1234
 
949
1235
  ## [5.1.0] - 2016-04-03
1236
+
950
1237
  ##### Added
1238
+
951
1239
  All 5.1.0 changes can be found in [#362](https://github.com/shakacode/react_on_rails/pull/362) by [justin808](https://github.com/justin808).
1240
+
952
1241
  - Generator enhancements
953
1242
  - Generator adds line to spec/rails_helper.rb so that running specs will ensure assets are compiled.
954
1243
  - Other small changes to the generator including adding necessary npm scripts to allow React on Rails to build assets.
@@ -964,149 +1253,192 @@ All 5.1.0 changes can be found in [#362](https://github.com/shakacode/react_on_r
964
1253
  ## [5.0.0] - 2016-04-01
965
1254
 
966
1255
  ##### Added
967
- - Added `railsContext`, an object which gets passed always as the second parameter to both react component and redux store generator functions, both for server and client rendering. This provides data like the current locale, the pathname, etc. The data values are customizable by a new configuration called `rendering_extension` where you can create a module with a method called `rendering_extension`. This allows you to add additional values to the Rails Context. Implement one static method called `custom_context(view_context)` and return a Hash. See [#345](https://github.com/shakacode/react_on_rails/pull/345) by [justin808](https://github.com/justin808)
1256
+
1257
+ - Added `railsContext`, an object which gets passed always as the second parameter to both React component and Redux store generator functions, both for server and client rendering. This provides data like the current locale, the pathname, etc. The data values are customizable by a new configuration called `rendering_extension` where you can create a module with a method called `rendering_extension`. This allows you to add additional values to the Rails Context. Implement one static method called `custom_context(view_context)` and return a Hash. See [#345](https://github.com/shakacode/react_on_rails/pull/345) by [justin808](https://github.com/justin808)
968
1258
 
969
1259
  ##### Changed
970
- - Previously, you could pass arbitrary additional html attributes to react_component. Now, you need to pass them in as a named parameter `html_options` to react_component.
1260
+
1261
+ - Previously, you could pass arbitrary additional HTML attributes to react_component. Now, you need to pass them in as a named parameter `html_options` to react_component.
971
1262
 
972
1263
  ##### Breaking Changes
1264
+
973
1265
  - You must provide named attributes, including `props` for view helper `react_component`. See [this commit](https://github.com/shakacode/react-webpack-rails-tutorial/commit/a97fa90042cbe27be7fd7fa70b5622bfcf9c3673) for an example migration used for [www.reactrails.com](http://www.reactrails.com).
974
1266
 
975
1267
  ## [4.0.3] - 2016-03-17
976
1268
 
977
1269
  ##### Fixed
1270
+
978
1271
  - `ReactOnRailsHelper#react_component`: Invalid deprecation message when called with only one parameter, the component name.
979
1272
 
980
1273
  ## [4.0.2] - 2016-03-17
981
1274
 
982
1275
  ##### Fixed
1276
+
983
1277
  - `ReactOnRails::Controller#redux_store`: 2nd parameter changed to a named parameter `props` for consistency.
984
1278
 
985
1279
  ## [4.0.1] - 2016-03-16
986
1280
 
987
1281
  ##### Fixed
1282
+
988
1283
  - Switched to `heroku buildpacks:set` syntax rather than using a `.buildpacks` file, which is deprecated. See [#319](https://github.com/shakacode/react_on_rails/pull/319) by [esauter5](https://github.com/esauter5). Includes both generator and doc updates.
989
1284
 
990
1285
  ## [4.0.0] - 2016-03-14
991
1286
 
992
1287
  ##### Added
1288
+
993
1289
  - [spec/dummy](spec/dummy) is a full sample app of React on Rails techniques **including** the hot reloading of assets from Rails!
994
1290
  - Added helpers `env_stylesheet_link_tag` and `env_javascript_include_tag` to support hot reloading Rails. See the [README.md](./README.md) for more details and see the example application in `spec/dummy`. Also see how this is used in the [tutorial: application.html.erb](https://github.com/shakacode/react-webpack-rails-tutorial/blob/master/app%2Fviews%2Flayouts%2Fapplication.html.erb#L6)
995
1291
  - Added optional parameter for ReactOnRails.getStore(name, throwIfMissing = true) so that you can check if a store is defined easily.
996
- - Added controller `module ReactOnRails::Controller`. Adds method `redux_store` to setup redux stores in the view.
1292
+ - Added controller `module ReactOnRails::Controller`. Adds method `redux_store` to set up Redux stores in the view.
997
1293
  - Added option `defer: true` for view helper `redux_store`. This allows the view helper to specify the props for store hydration, yet still render the props at the bottom of the view.
998
1294
  - Added view helper `redux_store_hydration_data` to render the props on the application's layout, near the bottom. This allows for the client hydration data to be parsed after the server rendering, which may result in a faster load time.
999
1295
  - The checker for outdated bundles before running tests will two configuration options: `generated_assets_dir` and `webpack_generated_files`.
1000
1296
  - Better support for Turbolinks 5!
1001
- - Fixed generator check of uncommitted code for foreign languages. See [#303](https://github.com/shakacode/react_on_rails/pull/303) by [nmatyukov](https://github.com/nmatyukov).
1297
+ - Fixed generator check of uncommitted code for foreign languages. See [#303](https://github.com/shakacode/react_on_rails/pull/303) by [nmatyukov](https://github.com/nmatyukov).
1002
1298
  - Added several parameters used for ensuring webpack assets are built for running tests:
1003
1299
  - `config.generated_assets_dir`: Directory where your generated webpack assets go. You can have only **one** directory for this.
1004
1300
  - `config.webpack_generated_files`: List of files that will get created in the `generated_assets_dir`. The test runner helper will ensure these generated files are newer than any of the files in the client directory.
1005
1301
 
1006
1302
  ##### Changed
1007
- - Generator default for webpack generated assets is now `app/assets/webpack` as we use this for both JavaScript and CSS generated assets.
1303
+
1304
+ - Generator default for webpack generated assets is now `app/assets/webpack` as we use this for both JavaScript and CSS generated assets.
1008
1305
 
1009
1306
  ##### Fixed
1307
+
1010
1308
  - The test runner "assets up to date checker" is greatly improved.
1011
1309
  - Lots of doc updates!
1012
1310
  - Improved the **spec/dummy** sample app so that it supports CSS modules, hot reloading, etc, and it can server as a template for a new ReactOnRails installation.
1013
1311
 
1014
1312
  ##### Breaking Changes
1015
- - Deprecated calling `redux_store(store_name, props)`. The API has changed. Use `redux_store(store_name, props: props, defer: false)` A new option called `defer` allows the rendering of store hydration at the bottom of the your layout. Place `redux_store_hydration_data` on your layout.
1313
+
1314
+ - Deprecated calling `redux_store(store_name, props)`. The API has changed. Use `redux_store(store_name, props: props, defer: false)` A new option called `defer` allows the rendering of store hydration at the bottom of the your layout. Place `redux_store_hydration_data` on your layout.
1016
1315
  - `config.server_bundle_js_file` has changed. The default value is now blank, meaning no server rendering. Addtionally, if you specify the file name, you should not include the path, as that should be specified in the `config.generated_assets_dir`.
1017
1316
  - `config.generated_assets_dirs` has been renamed to `config.generated_assets_dir` (singular) and it only takes one directory.
1018
1317
 
1019
1318
  ## [3.0.6] - 2016-03-01
1319
+
1020
1320
  ##### Fixed
1021
- - Improved errors when registered store is not found. See [#301](https://github.com/shakacode/react_on_rails/pull/301) by [justin808](https://github.com/justin808).
1321
+
1322
+ - Improved errors when registered store is not found. See [#301](https://github.com/shakacode/react_on_rails/pull/301) by [justin808](https://github.com/justin808).
1022
1323
 
1023
1324
  ## [3.0.5] - 2016-02-26
1325
+
1024
1326
  ##### Fixed
1025
- - Fixed error in linters rake file for generator. See [#299](https://github.com/shakacode/react_on_rails/pull/299) by [mpugach](https://github.com/mpugach).
1327
+
1328
+ - Fixed error in linters rake file for generator. See [#299](https://github.com/shakacode/react_on_rails/pull/299) by [mpugach](https://github.com/mpugach).
1026
1329
 
1027
1330
  ## [3.0.4] - 2016-02-25
1331
+
1028
1332
  ##### Fixed
1333
+
1029
1334
  - Updated CHANGELOG.md to include contributors for each PR.
1030
- - Fixed config.server_bundle_js file value in generator to match generator setting of server rendering. See [#295](https://github.com/shakacode/react_on_rails/pull/295) by [aaronvb](https://github.com/aaronvb).
1335
+ - Fixed config.server_bundle_js file value in generator to match generator setting of server rendering. See [#295](https://github.com/shakacode/react_on_rails/pull/295) by [aaronvb](https://github.com/aaronvb).
1031
1336
 
1032
1337
  ## [3.0.3] - 2016-02-21
1338
+
1033
1339
  ##### Fixed
1340
+
1034
1341
  - Cleaned up code in `spec/dummy` to latest React and Redux APIs. See [#282](https://github.com/shakacode/react_on_rails/pull/282).
1035
1342
  - Update generator messages with helpful information. See [#279](https://github.com/shakacode/react_on_rails/pull/279).
1036
1343
  - Other small generated comment fixes and doc fixes.
1037
1344
 
1038
1345
  ## [3.0.2] - 2016-02-15
1346
+
1039
1347
  ##### Fixed
1348
+
1040
1349
  - Fixed missing information in the helpful message after running the base install generator regarding how to run the node server with hot reloading support.
1041
1350
 
1042
1351
  ## [3.0.1] - 2016-02-15
1352
+
1043
1353
  ##### Fixed
1354
+
1044
1355
  - Fixed several jscs linter issues.
1045
1356
 
1046
1357
  ## [3.0.0] - 2016-02-15
1358
+
1047
1359
  ##### Fixed
1360
+
1048
1361
  - Fix Bootstrap Sass Append to Gemfile, missing new line. [#262](https://github.com/shakacode/react_on_rails/pull/262).
1049
1362
 
1050
1363
  ##### Added
1364
+
1051
1365
  - Added helper `redux_store` and associated JavaScript APIs that allow multiple React components to use the same store. Thus, you initialize the store, with props, separately from the components.
1052
1366
  - Added forman to gemspec in case new dev does not have it globally installed. [#248](https://github.com/shakacode/react_on_rails/pull/248).
1053
1367
  - Support for Turbolinks 5! [#270](https://github.com/shakacode/react_on_rails/pull/270).
1054
1368
  - Added better error messages for `ReactOnRails.register()`. [#273](https://github.com/shakacode/react_on_rails/pull/273).
1055
1369
 
1056
1370
  ##### Breaking Change
1371
+
1057
1372
  - Calls to `react_component` should use a named argument of props. For example, change this:
1373
+
1058
1374
  ```ruby
1059
1375
  <%= react_component("ReduxSharedStoreApp", {}, prerender: false, trace: true) %>
1060
1376
  ```
1061
1377
 
1062
1378
  to
1379
+
1063
1380
  ```ruby
1064
1381
  <%= react_component("ReduxSharedStoreApp", props: {}, prerender: false, trace: true) %>
1065
1382
  ```
1383
+
1066
1384
  You'll get a deprecation message to change this.
1067
- - Renamed `ReactOnRails.configure_rspec_to_compile_assets` to `ReactOnRails::TestHelper.configure_rspec_to_compile_assets`. The code has also been optimized to check for whether or not the compiled webpack bundles are up to date or not and will not run if not necessary. If you are using non-standard directories for your generated webpack assets (`app/assets/javascripts/generated` and `app/assets/stylesheets/generated`) or have additional directories you wish the helper to check, you need to update your ReactOnRails configuration accordingly. See [documentation](https://www.shakacode.com/react-on-rails/docs/guides/rspec_configuration) for how to do this. [#253](https://github.com/shakacode/react_on_rails/pull/253).
1068
- - You have to call `ReactOnRails.register` to register react components. This was deprecated in v2. [#273](https://github.com/shakacode/react_on_rails/pull/273).
1385
+
1386
+ - Renamed `ReactOnRails.configure_rspec_to_compile_assets` to `ReactOnRails::TestHelper.configure_rspec_to_compile_assets`. The code has also been optimized to check for whether or not the compiled webpack bundles are up to date or not and will not run if not necessary. If you are using non-standard directories for your generated webpack assets (`app/assets/javascripts/generated` and `app/assets/stylesheets/generated`) or have additional directories you wish the helper to check, you need to update your ReactOnRails configuration accordingly. See [documentation](https://www.shakacode.com/react-on-rails/docs/guides/rspec_configuration) for how to do this. [#253](https://github.com/shakacode/react_on_rails/pull/253).
1387
+ - You have to call `ReactOnRails.register` to register React components. This was deprecated in v2. [#273](https://github.com/shakacode/react_on_rails/pull/273).
1069
1388
 
1070
1389
  ##### Migration Steps v2 to v3
1390
+
1071
1391
  - See [these changes of spec/dummy/spec/rails_helper.rb](https://github.com/shakacode/react_on_rails/blob/master/spec/dummy/spec/rails_helper.rb#L36..38) for an example. Add this line to your `rails_helper.rb`:
1392
+
1072
1393
  ```ruby
1073
1394
  RSpec.configure do |config|
1074
1395
  # Ensure that if we are running js tests, we are using latest webpack assets
1075
1396
  ReactOnRails::TestHelper.configure_rspec_to_compile_assets(config)
1076
1397
  ```
1398
+
1077
1399
  - Change view helper calls to react_component to use the named param of `props`. See forum post [Using Regexp to update to ReactOnRails v3](http://forum.shakacode.com/t/using-regexp-to-update-to-reactonrails-v3/481).
1078
1400
 
1079
1401
  ## [2.3.0] - 2016-02-01
1402
+
1080
1403
  ##### Added
1404
+
1081
1405
  - Added polyfills for `setInterval` and `setTimeout` in case other libraries expect these to exist.
1082
1406
  - Added much improved debugging for errors in the server JavaScript webpack file.
1083
1407
  - See [#244](https://github.com/shakacode/react_on_rails/pull/244/) for these improvements.
1084
1408
 
1085
1409
  ## [2.2.0] - 2016-01-29
1410
+
1086
1411
  ##### Added
1412
+
1087
1413
  - New JavaScript API for debugging TurboLinks issues. Be sure to see [turbolinks docs](https://www.shakacode.com/react-on-rails/docs/rails/turbolinks). `ReactOnRails.setOptions({ traceTurbolinks: true });`. Removed the file `debug_turbolinks` added in 2.1.1. See [#243](https://github.com/shakacode/react_on_rails/pull/243).
1088
1414
 
1089
1415
  ## [2.1.1] - 2016-01-28
1090
1416
 
1091
1417
  ##### Fixed
1418
+
1092
1419
  - Fixed regression where apps that were not using Turbolinks would not render components on page load.
1093
1420
 
1094
1421
  ##### Added
1422
+
1095
1423
  - `ReactOnRails.render` returns a virtualDomElement Reference to your React component's backing instance. See [#234](https://github.com/shakacode/react_on_rails/pull/234).
1096
1424
  - `debug_turbolinks` helper for debugging turbolinks issues. See [turbolinks](https://www.shakacode.com/react-on-rails/docs/rails/turbolinks).
1097
1425
  - Enhanced regression testing for non-turbolinks apps. Runs all tests for dummy app with turbolinks both disabled and enabled.
1098
1426
 
1099
1427
  ## [2.1.0] - 2016-01-26
1428
+
1100
1429
  ##### Added
1430
+
1101
1431
  - Added EnsureAssetsCompiled feature so that you do not accidentally run tests without properly compiling the JavaScript bundles. Add a line to your `rails_helper.rb` file to check that the latest Webpack bundles have been generated prior to running tests that may depend on your client-side code. See [docs](https://www.shakacode.com/react-on-rails/docs/guides/rspec_configuration) for more detailed instructions. [#222](https://github.com/shakacode/react_on_rails/pull/222)
1102
1432
  - Added [migration guide](https://www.shakacode.com/react-on-rails/docs/additional-details/migrating-from-react-rails) for migrating from React-Rails. [#219](https://github.com/shakacode/react_on_rails/pull/219)
1103
1433
  - Added [React on Rails Doctrine](https://www.shakacode.com/react-on-rails/docs/misc/doctrine) to docs. Discusses the project's motivations, conventions, and principles. [#220](https://github.com/shakacode/react_on_rails/pull/220)
1104
1434
  - Added ability to skip `display:none` style in the generated content tag for a component. Some developers may want to disable inline styles for security reasons. See generated config [initializer file](lib/generators/react_on_rails/templates/base/base/config/initializers/react_on_rails.rb#L27) for example on setting `skip_display_none`. [#218](https://github.com/shakacode/react_on_rails/pull/218)
1105
1435
 
1106
1436
  ##### Changed
1437
+
1107
1438
  - Changed message when running the dev (a.k.a. "express" server). [#227](https://github.com/shakacode/react_on_rails/commit/543ae70254d0c7b477e2c92af86f40746e58a431)
1108
1439
 
1109
1440
  ##### Fixed
1441
+
1110
1442
  - Fixed handling of Turbolinks. Code was checking that Turbolinks was installed when it was not yet because some setups load Turbolinks after the bundles. The changes to the code will check if Turbolinks is installed after the page loaded event fires. Code was also added to allow easy debugging of Turbolinks, which should be useful when v5 of Turbolinks is released shortly. Details of how to configure Turbolinks with troubleshooting were added to `docs` directory. [#221](https://github.com/shakacode/react_on_rails/pull/221)
1111
1443
  - Fixed issue with already initialized constant warning appearing when starting a Rails server [#226](https://github.com/shakacode/react_on_rails/pull/226)
1112
1444
  - Fixed to make backwards compatible with Ruby v2.0 and updated all Ruby and Node dependencies.
@@ -1114,21 +1446,27 @@ RSpec.configure do |config|
1114
1446
  ---
1115
1447
 
1116
1448
  ## [2.0.2]
1449
+
1117
1450
  - Added better messages after generator runs. [#210](https://github.com/shakacode/react_on_rails/pull/210)
1118
1451
 
1119
1452
  ## [2.0.1]
1453
+
1120
1454
  - Fixed bug with version matching between gem and npm package.
1121
1455
 
1122
1456
  ## [2.0.0]
1457
+
1123
1458
  - Move JavaScript part of react_on_rails to npm package 'react-on-rails'.
1124
1459
  - Converted JavaScript code to ES6! with tests!
1125
1460
  - No global namespace pollution. ReactOnRails is the only global added.
1126
1461
  - New API. Instead of placing React components on the global namespace, you instead call ReactOnRails.register, passing an object where keys are the names of your components:
1462
+
1127
1463
  ```
1128
1464
  import ReactOnRails from 'react-on-rails';
1129
1465
  ReactOnRails.register({name: component});
1130
1466
  ```
1467
+
1131
1468
  Best done with Object destructing:
1469
+
1132
1470
  ```
1133
1471
  import ReactOnRails from 'react-on-rails';
1134
1472
  ReactOnRails.register(
@@ -1138,26 +1476,35 @@ Best done with Object destructing:
1138
1476
  }
1139
1477
  );
1140
1478
  ```
1141
- Previously, you used
1142
- ```
1143
- window.Component1 = Component1;
1144
- window.Component2 = Component2;
1145
- ```
1146
- This would pollute the global namespace. See details in the README.md for more information.
1479
+
1480
+ Previously, you used
1481
+
1482
+ ```
1483
+ window.Component1 = Component1;
1484
+ window.Component2 = Component2;
1485
+ ```
1486
+
1487
+ This would pollute the global namespace. See details in the README.md for more information.
1488
+
1147
1489
  - Your jade template for the WebpackDevServer setup should use the new API:
1490
+
1148
1491
  ```
1149
1492
  ReactOnRails.render(componentName, props, domNodeId);
1150
1493
  ```
1151
- such as:
1494
+
1495
+ such as:
1496
+
1152
1497
  ```
1153
1498
  ReactOnRails.render("HelloWorldApp", {name: "Stranger"}, 'app');
1154
1499
  ```
1500
+
1155
1501
  - All npm dependency libraries updated. Most notable is going to Babel 6.
1156
- - Dropped support for react 0.13.
1502
+ - Dropped support for React 0.13.
1157
1503
  - JS Linter uses ShakaCode JavaScript style: https://github.com/shakacode/style-guide-javascript
1158
- - Generators account these differences.
1504
+ - Generators account for these differences.
1159
1505
 
1160
1506
  ##### Migration Steps v1 to v2
1507
+
1161
1508
  [Example of upgrading](https://github.com/shakacode/react-webpack-rails-tutorial/commit/5b1b8698e8daf0f0b94e987740bc85ee237ef608)
1162
1509
 
1163
1510
  1. Update the `react_on_rails` gem.
@@ -1173,7 +1520,9 @@ Best done with Object destructing:
1173
1520
  ---
1174
1521
 
1175
1522
  ## [1.2.2]
1523
+
1176
1524
  ##### Fixed
1525
+
1177
1526
  - Missing Lodash from generated package.json [#175](https://github.com/shakacode/react_on_rails/pull/175)
1178
1527
  - Rails 3.2 could not run generators [#182](https://github.com/shakacode/react_on_rails/pull/182)
1179
1528
  - Better placement of jquery_ujs dependency [#171](https://github.com/shakacode/react_on_rails/pull/171)
@@ -1181,31 +1530,39 @@ Best done with Object destructing:
1181
1530
  - Lots of better docs.
1182
1531
 
1183
1532
  ## [1.2.0]
1533
+
1184
1534
  ##### Added
1535
+
1185
1536
  - Support `--skip-bootstrap` or `-b` option for generator.
1186
1537
  - Create examples tasks to test generated example apps.
1187
1538
 
1188
1539
  ##### Fixed
1540
+
1189
1541
  - Fix non-server rendering configuration issues.
1190
1542
  - Fix application.js incorrect overwritten issue.
1191
1543
  - Fix Gemfile dependencies.
1192
1544
  - Fix several generator issues.
1193
1545
 
1194
1546
  ##### Removed
1547
+
1195
1548
  - Removed templates/client folder.
1196
1549
 
1197
1550
  ---
1198
1551
 
1199
1552
  ## [1.1.1] - 2015-11-28
1553
+
1200
1554
  ##### Added
1555
+
1201
1556
  - Support for React Router.
1202
1557
  - Error and redirect handling.
1203
1558
  - Turbolinks support.
1204
1559
 
1205
1560
  ##### Fixed
1561
+
1206
1562
  - Fix several generator-related issues.
1207
1563
 
1208
- [Unreleased]: https://github.com/shakacode/react_on_rails/compare/14.2.0...master
1564
+ [Unreleased]: https://github.com/shakacode/react_on_rails/compare/15.0.0-alpha.2...master
1565
+ [15.0.0-alpha.2]: https://github.com/shakacode/react_on_rails/compare/14.2.0...15.0.0-alpha.2
1209
1566
  [14.2.0]: https://github.com/shakacode/react_on_rails/compare/14.1.1...14.2.0
1210
1567
  [14.1.1]: https://github.com/shakacode/react_on_rails/compare/14.1.0...14.1.1
1211
1568
  [14.1.0]: https://github.com/shakacode/react_on_rails/compare/14.0.5...14.1.0