react_on_rails 14.2.1 → 16.1.1

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 (116) hide show
  1. checksums.yaml +4 -4
  2. data/AI_AGENT_INSTRUCTIONS.md +63 -0
  3. data/CHANGELOG.md +564 -85
  4. data/CLAUDE.md +135 -0
  5. data/CODING_AGENTS.md +313 -0
  6. data/CONTRIBUTING.md +448 -37
  7. data/Gemfile.development_dependencies +6 -1
  8. data/Gemfile.lock +13 -4
  9. data/KUDOS.md +22 -1
  10. data/LICENSE.md +30 -4
  11. data/LICENSES/README.md +14 -0
  12. data/NEWS.md +48 -48
  13. data/PROJECTS.md +45 -40
  14. data/REACT-ON-RAILS-PRO-LICENSE.md +129 -0
  15. data/README.md +113 -42
  16. data/SUMMARY.md +62 -52
  17. data/TODO.md +135 -0
  18. data/bin/lefthook/check-trailing-newlines +38 -0
  19. data/bin/lefthook/get-changed-files +26 -0
  20. data/bin/lefthook/prettier-format +26 -0
  21. data/bin/lefthook/ruby-autofix +26 -0
  22. data/bin/lefthook/ruby-lint +27 -0
  23. data/eslint.config.ts +232 -0
  24. data/knip.ts +40 -6
  25. data/lib/generators/USAGE +4 -5
  26. data/lib/generators/react_on_rails/USAGE +65 -0
  27. data/lib/generators/react_on_rails/base_generator.rb +276 -62
  28. data/lib/generators/react_on_rails/dev_tests_generator.rb +1 -0
  29. data/lib/generators/react_on_rails/generator_helper.rb +35 -1
  30. data/lib/generators/react_on_rails/generator_messages.rb +138 -17
  31. data/lib/generators/react_on_rails/install_generator.rb +474 -26
  32. data/lib/generators/react_on_rails/react_no_redux_generator.rb +19 -6
  33. data/lib/generators/react_on_rails/react_with_redux_generator.rb +110 -18
  34. data/lib/generators/react_on_rails/templates/.eslintrc +1 -1
  35. data/lib/generators/react_on_rails/templates/base/base/Procfile.dev +5 -0
  36. data/lib/generators/react_on_rails/templates/base/base/Procfile.dev-prod-assets +8 -0
  37. data/lib/generators/react_on_rails/templates/base/base/Procfile.dev-static-assets +2 -0
  38. data/lib/generators/react_on_rails/templates/base/base/app/javascript/bundles/HelloWorld/components/HelloWorld.jsx +0 -5
  39. data/lib/generators/react_on_rails/templates/base/base/app/javascript/bundles/HelloWorld/components/HelloWorld.module.css +2 -2
  40. data/lib/generators/react_on_rails/templates/base/base/app/javascript/bundles/HelloWorld/components/HelloWorldServer.js +1 -1
  41. data/lib/generators/react_on_rails/templates/base/base/app/javascript/packs/server-bundle.js +1 -8
  42. data/lib/generators/react_on_rails/templates/base/base/app/javascript/src/HelloWorld/ror_components/HelloWorld.client.jsx +21 -0
  43. data/lib/generators/react_on_rails/templates/base/base/app/javascript/src/HelloWorld/ror_components/HelloWorld.client.tsx +25 -0
  44. data/lib/generators/react_on_rails/templates/base/base/app/javascript/src/HelloWorld/ror_components/HelloWorld.module.css +4 -0
  45. data/lib/generators/react_on_rails/templates/base/base/app/javascript/src/HelloWorld/ror_components/HelloWorld.server.jsx +5 -0
  46. data/lib/generators/react_on_rails/templates/base/base/app/javascript/src/HelloWorld/ror_components/HelloWorld.server.tsx +5 -0
  47. data/lib/generators/react_on_rails/templates/base/base/app/views/hello_world/index.html.erb.tt +1 -1
  48. data/lib/generators/react_on_rails/templates/base/base/app/views/layouts/hello_world.html.erb +4 -2
  49. data/lib/generators/react_on_rails/templates/base/base/babel.config.js.tt +5 -2
  50. data/lib/generators/react_on_rails/templates/base/base/bin/dev +34 -0
  51. data/lib/generators/react_on_rails/templates/base/base/config/initializers/react_on_rails.rb.tt +14 -5
  52. data/lib/generators/react_on_rails/templates/base/base/config/shakapacker.yml +76 -7
  53. data/lib/generators/react_on_rails/templates/base/base/config/webpack/commonWebpackConfig.js.tt +1 -1
  54. data/lib/generators/react_on_rails/templates/base/base/config/webpack/development.js.tt +6 -10
  55. data/lib/generators/react_on_rails/templates/base/base/config/webpack/production.js.tt +2 -2
  56. data/lib/generators/react_on_rails/templates/base/base/config/webpack/serverWebpackConfig.js.tt +3 -2
  57. data/lib/generators/react_on_rails/templates/base/base/config/webpack/test.js.tt +2 -2
  58. data/lib/generators/react_on_rails/templates/dev_tests/spec/system/hello_world_spec.rb +0 -2
  59. data/lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/actions/helloWorldActionCreators.ts +18 -0
  60. data/lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/components/HelloWorld.jsx +0 -6
  61. data/lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/components/HelloWorld.module.css +4 -0
  62. data/lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/components/HelloWorld.tsx +24 -0
  63. data/lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/constants/helloWorldConstants.ts +6 -0
  64. data/lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/containers/HelloWorldContainer.ts +20 -0
  65. data/lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/reducers/helloWorldReducer.js +1 -1
  66. data/lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/reducers/helloWorldReducer.ts +22 -0
  67. data/lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/startup/HelloWorldApp.client.tsx +23 -0
  68. data/lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/startup/HelloWorldApp.server.jsx +5 -0
  69. data/lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/startup/HelloWorldApp.server.tsx +5 -0
  70. data/lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/store/helloWorldStore.ts +18 -0
  71. data/lib/react_on_rails/configuration.rb +141 -57
  72. data/lib/react_on_rails/controller.rb +6 -2
  73. data/lib/react_on_rails/dev/file_manager.rb +78 -0
  74. data/lib/react_on_rails/dev/pack_generator.rb +27 -0
  75. data/lib/react_on_rails/dev/process_manager.rb +61 -0
  76. data/lib/react_on_rails/dev/server_manager.rb +487 -0
  77. data/lib/react_on_rails/dev.rb +20 -0
  78. data/lib/react_on_rails/doctor.rb +1149 -0
  79. data/lib/react_on_rails/engine.rb +6 -0
  80. data/lib/react_on_rails/git_utils.rb +12 -2
  81. data/lib/react_on_rails/helper.rb +176 -74
  82. data/lib/react_on_rails/json_parse_error.rb +6 -1
  83. data/lib/react_on_rails/packer_utils.rb +61 -71
  84. data/lib/react_on_rails/packs_generator.rb +221 -19
  85. data/lib/react_on_rails/prerender_error.rb +4 -0
  86. data/lib/react_on_rails/pro/NOTICE +21 -0
  87. data/lib/react_on_rails/pro/helper.rb +122 -0
  88. data/lib/react_on_rails/pro/utils.rb +53 -0
  89. data/lib/react_on_rails/react_component/render_options.rb +38 -6
  90. data/lib/react_on_rails/server_rendering_js_code.rb +0 -1
  91. data/lib/react_on_rails/server_rendering_pool/ruby_embedded_java_script.rb +12 -5
  92. data/lib/react_on_rails/system_checker.rb +659 -0
  93. data/lib/react_on_rails/test_helper/webpack_assets_compiler.rb +1 -1
  94. data/lib/react_on_rails/test_helper/webpack_assets_status_checker.rb +6 -4
  95. data/lib/react_on_rails/test_helper.rb +2 -3
  96. data/lib/react_on_rails/utils.rb +139 -43
  97. data/lib/react_on_rails/version.rb +1 -1
  98. data/lib/react_on_rails/version_checker.rb +14 -20
  99. data/lib/react_on_rails/version_syntax_converter.rb +1 -1
  100. data/lib/react_on_rails.rb +1 -0
  101. data/lib/tasks/assets.rake +1 -1
  102. data/lib/tasks/doctor.rake +48 -0
  103. data/lib/tasks/generate_packs.rake +158 -1
  104. data/react_on_rails.gemspec +1 -0
  105. data/tsconfig.eslint.json +6 -0
  106. data/tsconfig.json +5 -3
  107. metadata +63 -14
  108. data/REACT-ON-RAILS-PRO-LICENSE +0 -95
  109. data/lib/generators/react_on_rails/adapt_for_older_shakapacker_generator.rb +0 -41
  110. data/lib/generators/react_on_rails/bin/dev +0 -30
  111. data/lib/generators/react_on_rails/bin/dev-static +0 -30
  112. data/lib/generators/react_on_rails/templates/base/base/Procfile.dev-static.tt +0 -9
  113. data/lib/generators/react_on_rails/templates/base/base/Procfile.dev.tt +0 -5
  114. data/lib/generators/react_on_rails/templates/base/base/app/javascript/packs/registration.js.tt +0 -8
  115. /data/lib/generators/react_on_rails/templates/base/base/config/webpack/{webpackConfig.js.tt → generateWebpackConfigs.js.tt} +0 -0
  116. /data/lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/startup/{HelloWorldApp.jsx → HelloWorldApp.client.jsx} +0 -0
data/CHANGELOG.md CHANGED
@@ -1,50 +1,210 @@
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
 
21
- ### [14.2.1] - 2025-04-11
26
+ #### Bug Fixes
22
27
 
23
- #### Fixed
24
- - Fixed a bug where the `load` event was not firing in Safari by postponing hydration to the next JavaScript task using `setTimeout(callback, 0)`. [PR 1729](https://github.com/shakacode/react_on_rails/pull/1729) by [Romex91](https://github.com/Romex91).
25
- - 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).
26
- - 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:
27
- - Make it more prominent
28
- - Include a stack trace when clicked
28
+ - **React Server Components**: Fixed bug in resolving `react-server-client-manifest.json` file path. The manifest file path is now correctly resolved using `bundle_js_file_path` for improved configuration flexibility and consistency in bundle management. [PR 1818](https://github.com/shakacode/react_on_rails/pull/1818) by [AbanoubGhadban](https://github.com/AbanoubGhadban)
29
+
30
+ ### [16.1.0] - 2025-09-23
31
+
32
+ #### New Features
33
+
34
+ - **Server Bundle Security**: Added new configuration options for enhanced server bundle security and organization:
35
+
36
+ - `server_bundle_output_path`: Configurable directory (relative to the Rails root) for server bundle output (default: "ssr-generated"). If set to `nil`, the server bundle will be loaded from the same public directory as client bundles. [PR 1798](https://github.com/shakacode/react_on_rails/pull/1798) by [justin808](https://github.com/justin808)
37
+ - `enforce_private_server_bundles`: When enabled, ensures server bundles are only loaded from private directories outside the public folder (default: false for backward compatibility) [PR 1798](https://github.com/shakacode/react_on_rails/pull/1798) by [justin808](https://github.com/justin808)
38
+
39
+ - **Improved Bundle Path Resolution**: Bundle path resolution for server bundles now works as follows:
40
+
41
+ - If `server_bundle_output_path` is set, the server bundle is loaded from that directory.
42
+ - If `server_bundle_output_path` is not set, the server bundle falls back to the client bundle directory (typically the public output path).
43
+ - If `enforce_private_server_bundles` is enabled:
44
+ - The server bundle will only be loaded from the private directory specified by `server_bundle_output_path`.
45
+ - If the bundle is not found there, it will _not_ fall back to the public directory.
46
+ - If `enforce_private_server_bundles` is not enabled and the bundle is not found in the private directory, it will fall back to the public directory.
47
+ - This logic ensures that, when strict enforcement is enabled, server bundles are never loaded from public directories, improving security and clarity of bundle resolution. [PR 1798](https://github.com/shakacode/react_on_rails/pull/1798) by [justin808](https://github.com/justin808)
48
+
49
+ - **`react_on_rails:doctor` rake task**: New diagnostic command to validate React on Rails setup and identify configuration issues. Provides comprehensive checks for environment prerequisites, dependencies, Rails integration, and Webpack configuration. Use `rake react_on_rails:doctor` to diagnose your setup, with optional `VERBOSE=true` for detailed output. [PR 1791](https://github.com/shakacode/react_on_rails/pull/1791) by [AbanoubGhadban](https://github.com/AbanoubGhadban)
50
+
51
+ #### Deprecations
52
+
53
+ - **Deprecated `generated_assets_dirs` configuration**: The legacy `config.generated_assets_dirs` option is now deprecated and will show a deprecation warning if used. Since Shakapacker is now required, asset paths are automatically determined from `shakapacker.yml` configuration. Remove any `config.generated_assets_dirs` from your `config/initializers/react_on_rails.rb` file. Use `public_output_path` in `config/shakapacker.yml` to customize asset output location instead. [PR 1798](https://github.com/shakacode/react_on_rails/pull/1798) by [justin808](https://github.com/justin808)
54
+
55
+ #### API Improvements
56
+
57
+ - **Method Naming Clarification**: Added `public_bundles_full_path` method to clarify bundle path handling:
58
+ - `public_bundles_full_path`: New method specifically for webpack bundles in public directories
59
+ - `generated_assets_full_path`: Now deprecated (backwards-compatible alias)
60
+ - This eliminates confusion between webpack bundles and general Rails public assets [PR 1798](https://github.com/shakacode/react_on_rails/pull/1798) by [justin808](https://github.com/justin808)
61
+
62
+ #### Security Enhancements
63
+
64
+ - **Private Server Bundle Enforcement**: When `enforce_private_server_bundles` is enabled, server bundles bypass public directory fallbacks and are only loaded from designated private locations [PR 1798](https://github.com/shakacode/react_on_rails/pull/1798) by [justin808](https://github.com/justin808)
65
+ - **Path Validation**: Added validation to ensure `server_bundle_output_path` points to private directories when enforcement is enabled [PR 1798](https://github.com/shakacode/react_on_rails/pull/1798) by [justin808](https://github.com/justin808)
66
+ - **Fixed command injection vulnerabilities**: Replaced unsafe string interpolation in generator package installation commands with secure array-based system calls [PR 1786](https://github.com/shakacode/react_on_rails/pull/1786) by [justin808](https://github.com/justin808)
67
+ - **Improved input validation**: Enhanced package manager validation and argument sanitization across all generators [PR 1786](https://github.com/shakacode/react_on_rails/pull/1786) by [justin808](https://github.com/justin808)
68
+ - **Hardened DOM selectors**: Using `CSS.escape()` and proper JavaScript escaping for XSS protection [PR 1791](https://github.com/shakacode/react_on_rails/pull/1791) by [AbanoubGhadban](https://github.com/AbanoubGhadban)
69
+
70
+ #### Pro License Features
71
+
72
+ - **Core/Pro separation**: Moved Pro features into dedicated `lib/react_on_rails/pro/` and `node_package/src/pro/` directories with clear licensing boundaries [PR 1791](https://github.com/shakacode/react_on_rails/pull/1791) by [AbanoubGhadban](https://github.com/AbanoubGhadban)
73
+ - **Runtime license validation**: Implemented Pro license gating with graceful fallback to core functionality when Pro license unavailable [PR 1791](https://github.com/shakacode/react_on_rails/pull/1791) by [AbanoubGhadban](https://github.com/AbanoubGhadban)
74
+ - **Enhanced immediate hydration**: Improved immediate hydration functionality with Pro license validation and warning badges [PR 1791](https://github.com/shakacode/react_on_rails/pull/1791) by [AbanoubGhadban](https://github.com/AbanoubGhadban)
75
+ - **License documentation**: Added NOTICE files in Pro directories referencing canonical `REACT-ON-RAILS-PRO-LICENSE.md` [PR 1791](https://github.com/shakacode/react_on_rails/pull/1791) by [AbanoubGhadban](https://github.com/AbanoubGhadban)
76
+
77
+ #### Generator Improvements
78
+
79
+ - **Modern TypeScript patterns**: Generators now produce more idiomatic TypeScript code with improved type inference instead of explicit type annotations [PR 1786](https://github.com/shakacode/react_on_rails/pull/1786) by [justin808](https://github.com/justin808)
80
+ - **Optimized tsconfig.json**: Updated compiler options to use `"moduleResolution": "bundler"` for better bundler compatibility [PR 1786](https://github.com/shakacode/react_on_rails/pull/1786) by [justin808](https://github.com/justin808)
81
+ - **Enhanced Redux TypeScript integration**: Improved type safety and modern React patterns (useMemo, type-only imports) [PR 1786](https://github.com/shakacode/react_on_rails/pull/1786) by [justin808](https://github.com/justin808)
82
+ - **Smart bin/dev defaults**: Generated `bin/dev` script now automatically navigates to `/hello_world` route for immediate component visibility [PR 1786](https://github.com/shakacode/react_on_rails/pull/1786) by [justin808](https://github.com/justin808)
83
+ - **Better component templates**: Removed unnecessary type annotations while maintaining type safety through TypeScript's inference [PR 1786](https://github.com/shakacode/react_on_rails/pull/1786) by [justin808](https://github.com/justin808)
84
+ - **Cleaner generated code**: Streamlined templates following modern React and TypeScript best practices [PR 1786](https://github.com/shakacode/react_on_rails/pull/1786) by [justin808](https://github.com/justin808)
85
+ - **Improved helper methods**: Added reusable `component_extension` helper for consistent file extension handling [PR 1786](https://github.com/shakacode/react_on_rails/pull/1786) by [justin808](https://github.com/justin808)
86
+
87
+ #### Bug Fixes
88
+
89
+ - **Doctor rake task**: Fixed LoadError in `rake react_on_rails:doctor` when using packaged gem. The task was trying to require excluded `rakelib/task_helpers` file. [PR 1795](https://github.com/shakacode/react_on_rails/pull/1795) by [justin808](https://github.com/justin808)
90
+ - **Packs generator**: Fixed error when `server_bundle_js_file` configuration is empty (default). Added safety check to prevent attempting operations on invalid file paths when server-side rendering is not configured. [PR 1802](https://github.com/shakacode/react_on_rails/pull/1802) by [justin808](https://github.com/justin808)
91
+ - **Non-Packer Environment Compatibility**: Fixed potential NoMethodError when using bundle path resolution in environments without Shakapacker [PR 1798](https://github.com/shakacode/react_on_rails/pull/1798) by [justin808](https://github.com/justin808)
92
+ - **Shakapacker version requirements**: Fixed inconsistent version requirements between basic pack generation (6.5.1+) and advanced auto-bundling features (7.0.0+). Added backward compatibility for users on Shakapacker 6.5.1-6.9.x while providing clear upgrade guidance for advanced features. Added new constants `MINIMUM_SHAKAPACKER_VERSION_FOR_AUTO_BUNDLING` and improved version checking performance with caching. [PR 1798](https://github.com/shakacode/react_on_rails/pull/1798) by [justin808](https://github.com/justin808)
93
+
94
+ #### Code Improvements
95
+
96
+ - **PackerUtils abstraction removal**: Removed unnecessary `PackerUtils.packer` abstraction method and replaced all calls with direct `::Shakapacker` usage. This simplifies the codebase by eliminating an abstraction layer that was originally created to support multiple webpack tools but is no longer needed since we only support Shakapacker. All tests updated accordingly. [PR 1798](https://github.com/shakacode/react_on_rails/pull/1798) by [claude-code](https://claude.ai/code)
97
+ - **Architecture refactoring**: Centralized Pro utilities and clean separation between core and Pro helper functionality [PR 1791](https://github.com/shakacode/react_on_rails/pull/1791) by [AbanoubGhadban](https://github.com/AbanoubGhadban)
98
+
99
+ ### [16.0.0] - 2025-09-16
100
+
101
+ **React on Rails v16 is a major release that modernizes the library with ESM support, removes legacy Webpacker compatibility, and introduces significant performance improvements. This release builds on the foundation of v14 with enhanced RSC (React Server Components) support and streamlined configuration.**
102
+
103
+ See [Release Notes](docs/release-notes/16.0.0.md) for complete migration guide.
104
+
105
+ #### Major Enhancements
106
+
107
+ **🚀 React Server Components (RSC) -- Requires React on Rails Pro**
108
+
109
+ - **Enhanced RSC rendering flow**: Eliminated double rendering and reduced HTTP requests
110
+ - **`RSCRoute` component**: Seamless server-side rendering with automatic payload injection and hydration [PR 1696](https://github.com/shakacode/react_on_rails/pull/1696) by [AbanoubGhadban](https://github.com/AbanoubGhadban)
111
+ - **Optimized RSC payload injection**: Now injected after component HTML markup for better performance [PR 1738](https://github.com/shakacode/react_on_rails/pull/1738) by [AbanoubGhadban](https://github.com/AbanoubGhadban)
112
+ - **Communication protocol v2.0.0**: Supports uploading multiple bundles at once for improved efficiency
113
+
114
+ **⚡ Performance & Loading Strategy**
115
+
116
+ - **New `generated_component_packs_loading_strategy`**: Choose from `sync`, `async`, or `defer` strategies [PR 1712](https://github.com/shakacode/react_on_rails/pull/1712) by [AbanoubGhadban](https://github.com/AbanoubGhadban)
117
+ - **Async render function support**: Components can now return from async render functions [PR 1720](https://github.com/shakacode/react_on_rails/pull/1720) by [AbanoubGhadban](https://github.com/AbanoubGhadban)
118
+ - **Optimized client imports**: Generated packs now import from `react-on-rails/client` for better tree-shaking [PR 1706](https://github.com/shakacode/react_on_rails/pull/1706) by [alexeyr-ci](https://github.com/alexeyr-ci)
119
+
120
+ #### Developer Experience
121
+
122
+ - **Enhanced error messaging**: Clearer troubleshooting steps and prominent optimization warnings
123
+ - **Modern global access**: Using `globalThis` instead of window/global detection [PR 1727](https://github.com/shakacode/react_on_rails/pull/1727) by [alexeyr-ci2](https://github.com/alexeyr-ci2)
124
+ - **Simplified CI configuration**: Clear `minimum`/`latest` dependency naming instead of `oldest`/`newest`
125
+ - **ReactRefreshWebpackPlugin v0.6.0 support**: Added conditional logic for proper configuration [PR 1748](https://github.com/shakacode/react_on_rails/pull/1748) by [judahmeek](https://github.com/judahmeek)
126
+ - **Version validation improvements**: Fixed invalid warnings with pre-release versions [PR 1742](https://github.com/shakacode/react_on_rails/pull/1742) by [alexeyr-ci2](https://github.com/alexeyr-ci2)
127
+
128
+ #### Breaking Changes
129
+
130
+ **🔧 Webpacker Support Removed**
131
+
132
+ - **Complete removal of Webpacker support**. Shakapacker >= 6.0 is now required.
133
+ - Migration:
134
+ - Remove `webpacker` gem from your Gemfile
135
+ - Install `shakapacker` gem version 6.0+ (8.0+ recommended)
136
+ - Replace `bin/webpacker` commands with `bin/shakapacker`
137
+ - Update webpacker configuration files to shakapacker equivalents
138
+ - Removed files: `rakelib/webpacker_examples.rake`, `lib/generators/react_on_rails/adapt_for_older_shakapacker_generator.rb`
139
+
140
+ **📦 Package System Modernization**
141
+
142
+ - **ESM-only package**: CommonJS `require()` no longer supported
143
+ - Migration:
144
+ - Replace `require('react-on-rails')` with `import ReactOnRails from 'react-on-rails'`
145
+ - For Node.js < 20.19.0, upgrade or use dynamic imports
146
+ - For TypeScript errors, upgrade to TypeScript 5.8+ and set `module: "nodenext"`
147
+
148
+ **⚡ Configuration API Changes**
149
+
150
+ - **`defer_generated_component_packs` deprecated** → use `generated_component_packs_loading_strategy`
151
+ - Migration:
152
+
153
+ - `defer_generated_component_packs: true` → `generated_component_packs_loading_strategy: :defer`
154
+ - `defer_generated_component_packs: false` → `generated_component_packs_loading_strategy: :sync`
155
+ - Recommended: `generated_component_packs_loading_strategy: :async` for best performance
156
+
157
+ - **`force_load` renamed to `immediate_hydration`** for API clarity
158
+ - Migration:
159
+ - `config.force_load = true` → `config.immediate_hydration = true`
160
+ - `react_component(force_load: true)` → `react_component(immediate_hydration: true)`
161
+ - `redux_store(force_load: true)` → `redux_store(immediate_hydration: true)`
162
+ - Note: `immediate_hydration` requires React on Rails Pro license
163
+
164
+ **🔄 Async API Changes**
165
+
166
+ - **`ReactOnRails.reactOnRailsPageLoaded()` is now async**
167
+ - Migration: Add `await` when calling: `await ReactOnRails.reactOnRailsPageLoaded()`
168
+
169
+ **🏗️ Runtime Suggested Versions**
170
+
171
+ - Ruby: 3.2 - 3.4 (was 3.0 - 3.3)
172
+ - Node.js: 20 - 22 (was 16 - 20)
173
+ - Note: These are CI-tested versions; older versions may work but aren't guaranteed
174
+
175
+ **🎯 Generator Improvements**
176
+
177
+ - Install generator now validates JavaScript package manager presence
178
+ - Improved error handling with `Thor::Error` instead of `exit(1)`
179
+ - Enhanced error messages with clearer troubleshooting steps
180
+
181
+ ### [15.0.0] - 2025-08-28 - RETRACTED
182
+
183
+ **⚠️ This version has been retracted due to API design issues. Please upgrade directly to v16.0.0.**
184
+
185
+ The `force_load` feature was incorrectly available without a Pro license and has been renamed to `immediate_hydration` for better clarity. All features from v15 are available in v16 with the corrected API.
29
186
 
30
187
  ### [14.2.0] - 2025-03-03
31
188
 
32
189
  #### Added
190
+
33
191
  - 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).
34
192
 
35
193
  #### Fixed
194
+
36
195
  - 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).
37
196
  - Disable `esModuleInterop` to increase interoperability [PR 1699](https://github.com/shakacode/react_on_rails/pull/1699) by [alexeyr-ci](https://github.com/alexeyr-ci).
38
197
  - 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).
39
198
 
40
199
  #### Changed
200
+
41
201
  - 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).
42
202
 
43
203
  ### [14.1.1] - 2025-01-15
44
204
 
45
205
  #### Fixed
46
206
 
47
- - 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).
207
+ - 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).
48
208
  - 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).
49
209
 
50
210
  ### [14.1.0] - 2025-01-06
@@ -57,6 +217,7 @@ Changes since the last non-beta release.
57
217
  - 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).
58
218
 
59
219
  #### Added
220
+
60
221
  - Added streaming server rendering support:
61
222
  - [PR #1633](https://github.com/shakacode/react_on_rails/pull/1633) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
62
223
  - New `stream_react_component` helper for adding streamed components to views
@@ -67,23 +228,29 @@ Changes since the last non-beta release.
67
228
  - 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).
68
229
 
69
230
  #### Changed
231
+
70
232
  - 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).
71
233
 
72
234
  ### [14.0.5] - 2024-08-20
235
+
73
236
  #### Fixed
237
+
74
238
  - 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).
75
239
 
76
240
  ### [14.0.4] - 2024-07-02
77
241
 
78
242
  #### Improved
243
+
79
244
  - Improved dependency management by integrating package_json. [PR 1639](https://github.com/shakacode/react_on_rails/pull/1639) by [vaukalak](https://github.com/vaukalak).
80
245
 
81
246
  #### Changed
247
+
82
248
  - 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).
83
249
 
84
250
  ### [14.0.3] - 2024-06-28
85
251
 
86
252
  #### Fixed
253
+
87
254
  - Fixed css-loader installation with [PR 1634](https://github.com/shakacode/react_on_rails/pull/1634) by [vaukalak](https://github.com/vaukalak).
88
255
  - 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).
89
256
  - 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).
@@ -91,96 +258,121 @@ Changes since the last non-beta release.
91
258
  ### [14.0.2] - 2024-06-11
92
259
 
93
260
  #### Fixed
261
+
94
262
  - Generator errors with Shakapacker v8+ fixed [PR 1629](https://github.com/shakacode/react_on_rails/pull/1629) by [vaukalak](https://github.com/vaukalak)
95
263
 
96
264
  ### [14.0.1] - 2024-05-16
97
265
 
98
266
  #### Fixed
267
+
99
268
  - 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).
100
269
 
101
270
  ### [14.0.0] - 2024-04-03
271
+
102
272
  _Major bump because dropping support for Ruby 2.7 and deprecated `webpackConfigLoader.js`._
103
273
 
104
274
  #### Removed
275
+
105
276
  - Dropped Ruby 2.7 support [PR 1595](https://github.com/shakacode/react_on_rails/pull/1595) by [ahangarha](https://github.com/ahangarha).
106
277
  - Removed deprecated `webpackConfigLoader.js` [PR 1600](https://github.com/shakacode/react_on_rails/pull/1600) by [ahangarha](https://github.com/ahangarha).
107
278
 
108
279
  #### Fixed
280
+
109
281
  - 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).
110
282
  - 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).
111
283
  - 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)
112
284
  - Removed a workaround in `JsonOutput#escape` for an no-longer supported Rails version. Additionally, removed `Utils.rails_version_less_than_4_1_1`
113
- which was only used in the workaround. [PR 1580](https://github.com/shakacode/react_on_rails/pull/1580) by [wwahammy](https://github.com/wwahammy)
285
+ which was only used in the workaround. [PR 1580](https://github.com/shakacode/react_on_rails/pull/1580) by [wwahammy](https://github.com/wwahammy)
114
286
 
115
287
  #### Added
288
+
116
289
  - Exposed TypeScript all types [PR 1586](https://github.com/shakacode/react_on_rails/pull/1586) by [kotarella1110](https://github.com/kotarella1110)
117
290
 
118
291
  ### [13.4.0] - 2023-07-30
292
+
119
293
  #### Fixed
294
+
120
295
  - 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).
121
296
 
122
297
  #### Improved
298
+
123
299
  - 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).
124
300
 
125
301
  #### Added
302
+
126
303
  - 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).
127
304
 
128
305
  #### Changed
306
+
129
307
  - Throw error when attempting to redefine ReactOnRails. [PR 1562](https://github.com/shakacode/react_on_rails/pull/1562) by [rubenochiavone](https://github.com/rubenochiavone).
130
308
  - 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).
131
309
  - 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).
132
310
 
133
-
134
311
  ### [13.3.5] - 2023-05-31
312
+
135
313
  #### Fixed
136
- - 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).
314
+
315
+ - 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).
137
316
 
138
317
  ### [13.3.4] - 2023-05-23
139
318
 
140
319
  #### Added
320
+
141
321
  - 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).
142
322
 
143
323
  #### Removed
324
+
144
325
  - 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).
145
326
 
146
327
  ### [13.3.3] - 2023-03-21
147
328
 
148
329
  #### Fixed
330
+
149
331
  - Fixed bug regarding loading FS-based packs. [PR 1527](https://github.com/shakacode/react_on_rails/pull/1527) by [judahmeek](https://github.com/judahmeek).
150
332
 
151
333
  ### [13.3.2] - 2023-02-24
152
334
 
153
335
  #### Fixed
336
+
154
337
  - 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).
155
338
 
156
339
  ### [13.3.1] - 2023-01-30
340
+
157
341
  #### Added
342
+
158
343
  - 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).
159
-
344
+
160
345
  #### Fixed
346
+
161
347
  - Fixed bug regarding FS-based packs generation. [PR 1515](https://github.com/shakacode/react_on_rails/pull/1515) by [pulkitkkr](https://github.com/pulkitkkr).
162
348
 
163
349
  ### [13.3.0] - 2023-01-29
350
+
164
351
  #### Fixed
352
+
165
353
  - 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).
166
- - 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).
354
+ - 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).
167
355
  - 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).
168
356
 
169
357
  #### Added
358
+
170
359
  - 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).
171
360
 
172
361
  ### [13.2.0] - 2022-12-23
173
-
362
+
174
363
  #### Fixed
364
+
175
365
  - 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).
176
366
  - 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).
177
367
 
178
368
  #### Added
369
+
179
370
  - Exposed `reactHydrateOrRender` utility via [PR 1481](https://github.com/shakacode/react_on_rails/pull/1481) by [vaukalak](https://github.com/vaukalak).
180
371
 
181
372
  ### [13.1.0] - 2022-08-20
182
373
 
183
374
  #### Improved
375
+
184
376
  - 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).
185
377
 
186
378
  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`.
@@ -192,62 +384,80 @@ which was only used in the workaround. [PR 1580](https://github.com/shakacode/re
192
384
  - 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).
193
385
 
194
386
  #### Fixed
387
+
195
388
  - Correctly unmount roots under React 18. [PR 1466](https://github.com/shakacode/react_on_rails/pull/1466) by [alexeyr](https://github.com/alexeyr).
196
389
 
197
390
  - 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).
198
391
 
199
392
  In exchange, you may see a warning like this when building using any version of React below 18:
393
+
200
394
  ```
201
395
  WARNING in ./node_modules/react-on-rails/node_package/lib/reactHydrateOrRender.js19:25-52
202
396
  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'
203
397
  @ ./node_modules/react-on-rails/node_package/lib/ReactOnRails.js 34:45-78
204
398
  @ ./client/app/packs/client-bundle.js 5:0-42 32:0-23 35:0-21 59:0-26
205
399
  ```
400
+
206
401
  It can be safely [suppressed](https://webpack.js.org/configuration/other-options/#ignorewarnings) in your Webpack configuration.
207
402
 
208
403
  ### [13.0.2] - 2022-03-09
404
+
209
405
  #### Fixed
406
+
210
407
  - 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).
211
408
 
212
409
  ### [13.0.1] - 2022-02-09
410
+
213
411
  #### Improved
412
+
214
413
  - Updated the default generator. [PR 1431](https://github.com/shakacode/react_on_rails/pull/1431) by [justin808](https://github.com/justin808).
215
414
 
216
415
  ### [13.0.0] - 2022-02-08
416
+
217
417
  #### Breaking
418
+
218
419
  - Removed webpacker as a dependency. Add gem Shakapacker to your project, and update your package.json to also use shakapacker.
219
420
 
220
421
  #### Fixed
422
+
221
423
  - Proper throwing of exceptions.
222
424
  - Default configuration better handles test env.
223
425
 
224
426
  ### [12.6.0] - 2022-01-22
225
427
 
226
428
  #### Added
429
+
227
430
  - 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).
228
431
 
229
432
  ### [12.5.2] - 2021-12-29
433
+
230
434
  #### Fixed
435
+
231
436
  - 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).
232
437
 
233
438
  ### [12.5.1] - 2021-12-27
234
439
 
235
440
  #### Fixed
441
+
236
442
  - 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).
237
443
 
238
444
  ### [12.5.0] - 2021-12-26
239
445
 
240
446
  #### Added
447
+
241
448
  - 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).
242
- - 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).
449
+ - 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).
243
450
  - Supports Rails 7.
244
451
 
245
452
  #### Changed
246
- - 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).
453
+
454
+ - 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).
247
455
  - Minimum required Ruby is 2.7 to match latest rails/webpacker.
248
456
 
249
457
  ### [12.4.0] - 2021-09-22
458
+
250
459
  #### Added
460
+
251
461
  - ScoutAPM tracing support for server rendering [PR 1379](https://github.com/shakacode/react_on_rails/pull/1379) by [justin808](https://github.com/justin808).
252
462
 
253
463
  - 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)!
@@ -255,30 +465,41 @@ which was only used in the workaround. [PR 1580](https://github.com/shakacode/re
255
465
  - 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)
256
466
 
257
467
  ### [12.3.0] - 2021-07-26
468
+
258
469
  #### Added
470
+
259
471
  - 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).
260
472
 
261
473
  To configure turbo the following option can be set:
262
474
  `ReactOnRails.setOptions({ turbo: true })`
263
475
 
264
476
  ### [12.2.0] - 2021-03-25
477
+
265
478
  #### Added
266
- - Ability to configure server react rendering to throw rather than just logging the error. Useful for
479
+
480
+ - Ability to configure server React rendering to throw rather than just logging the error. Useful for
267
481
  React on Rails Pro Node rendering [PR 1365](https://github.com/shakacode/react_on_rails/pull/1365) by [justin808](https://github.com/justin808).
268
482
 
269
483
  ### [12.1.0] - 2021-03-23
484
+
270
485
  #### Added
486
+
271
487
  - 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).
272
488
 
273
489
  #### Fixed
490
+
274
491
  - 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).
275
492
 
276
493
  ### [12.0.4] - 2020-11-14
494
+
277
495
  #### Fixed
496
+
278
497
  - 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).
279
498
 
280
499
  ### [12.0.3] - 2020-09-20
500
+
281
501
  #### Fixed
502
+
282
503
  - Async script loading optimizes page load speed. With this fix, a bundle
283
504
  can be loaded "async" and a handler function can determine when to hydrate.
284
505
  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).
@@ -286,23 +507,30 @@ which was only used in the workaround. [PR 1580](https://github.com/shakacode/re
286
507
  Loadable-Components is supported by [React on Rails Pro](https://www.shakacode.com/react-on-rails-pro).
287
508
 
288
509
  ### [12.0.2] - 2020-07-09
510
+
289
511
  #### Fixed
512
+
290
513
  - Remove dependency upon Redux for Typescript types. [PR 1323](https://github.com/shakacode/react_on_rails/pull/1323) by [justin808](https://github.com/justin808).
291
514
 
292
515
  ### [12.0.1] - 2020-07-09
516
+
293
517
  #### Fixed
518
+
294
519
  - 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).
295
520
 
296
521
  ### [12.0.0] - 2020-07-08
522
+
297
523
  For upgrade instructions, see [docs/guides/upgrading-react-on-rails.md](https://www.shakacode.com/react-on-rails/docs/guides/upgrading-react-on-rails).
298
524
 
299
525
  #### Major Improvements
526
+
300
527
  1. **React Hooks Support** for top level components
301
528
  2. **Typescript bindings**
302
529
  3. **rails/webpacker** "just works" with React on Rails by default.
303
530
  4. i18n support for generating a JSON file rather than a JS file.
304
531
 
305
532
  #### BREAKING CHANGE
533
+
306
534
  In order to solve the issues regarding React Hooks compatibility, the number of parameters
307
535
  for functions is used to determine if you have a generator function that will get invoked to
308
536
  return a React component, or you are registering a functional React component. Alternately, you can
@@ -314,19 +542,20 @@ See [docs/guides/upgrading-react-on-rails](https://www.shakacode.com/react-on-ra
314
542
  for details.
315
543
 
316
544
  #### Other Updates
317
- * `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.
318
- * Changed the precompile task to use the rails/webpacker one by default
319
- * Updated generators to use React hooks
320
- * Requires the use of rails/webpacker view helpers
321
- * If the webpacker webpack config files exist, then React on Rails will not override the default
322
- assets:precompile setup by rails/webpacker. If you are not using the rails/webpacker setup for webpack,
545
+
546
+ - `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.
547
+ - Changed the precompile task to use the rails/webpacker one by default
548
+ - Updated generators to use React hooks
549
+ - Requires the use of rails/webpacker view helpers
550
+ - If the webpacker Webpack config files exist, then React on Rails will not override the default
551
+ assets:precompile set up by rails/webpacker. If you are not using the rails/webpacker setup for Webpack,
323
552
  then be sure to remove the JS files inside of config/webpack, like `config/webpack/production.js.`
324
- * Removed **env_javascript_include_tag** and **env_stylesheet_link_tag** as these are replaced by view helpers
553
+ - Removed **env_javascript_include_tag** and **env_stylesheet_link_tag** as these are replaced by view helpers
325
554
  from rails/webpacker
326
- * Removal of support for old Rubies and Rails.
327
- * Removal of config.symlink_non_digested_assets_regex as it's no longer needed with rails/webpacker.
555
+ - Removal of support for old Rubies and Rails.
556
+ - Removal of config.symlink_non_digested_assets_regex as it's no longer needed with rails/webpacker.
328
557
  If any business needs this, we can move the code to a separate gem.
329
- * Added configuration option `same_bundle_for_client_and_server` with default `false` because
558
+ - Added configuration option `same_bundle_for_client_and_server` with default `false` because
330
559
 
331
560
  1. Production applications would typically have a server bundle that differs from the client bundle
332
561
  2. This change only affects trying to use HMR with react_on_rails with rails/webpacker.
@@ -337,7 +566,7 @@ for details.
337
566
  If you are using the **same bundle for client and server rendering**, then set this configuration option
338
567
  to `true`. By [justin808](https://github.com/shakacode/react_on_rails/pull/1240).
339
568
 
340
- * Added support to export locales in JSON format. New option added `i18n_output_format` which allows to
569
+ - Added support to export locales in JSON format. New option added `i18n_output_format` which allows to
341
570
  specify locales format either `JSON` or `JS`. **`JSON` format is now the default.**
342
571
 
343
572
  **Use this config setting to get the old behavior: config.i18n_output_format = 'js'**
@@ -345,31 +574,40 @@ for details.
345
574
  [PR 1271](https://github.com/shakacode/react_on_rails/pull/1271) by [ashgaliyev](https://github.com/ashgaliyev).
346
575
 
347
576
  - 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).
348
- - 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).
577
+ - 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).
349
578
 
350
579
  ### [11.3.0] - 2019-05-24
580
+
351
581
  #### Added
582
+
352
583
  - Added method for retrieving any option from `render_options` [PR 1213](https://github.com/shakacode/react_on_rails/pull/1213)
353
- by [ashgaliyev](https://github.com/ashgaliyev).
584
+ by [ashgaliyev](https://github.com/ashgaliyev).
354
585
 
355
586
  - html_options has an option for 'tag' to set the html tag name like this: `html_options: { tag: "span" }`.
356
- [PR 1208](https://github.com/shakacode/react_on_rails/pull/1208) by [tahsin352](https://github.com/tahsin352).
587
+ [PR 1208](https://github.com/shakacode/react_on_rails/pull/1208) by [tahsin352](https://github.com/tahsin352).
357
588
 
358
589
  ### [11.2.2] - 2018-12-24
590
+
359
591
  #### Improved
592
+
360
593
  - rails_context can more easily be called from controller methods. The mandatory param of server_side has been made optional.
361
594
 
362
595
  ### [11.2.1] - 2018-12-06
596
+
363
597
  ## MIGRATION for v11.2
598
+
364
599
  - If using **React on Rails Pro**, upgrade react_on_rails_pro to a version >= 1.3.
365
600
 
366
601
  #### Improved
602
+
367
603
  - 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).
368
604
 
369
605
  - 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).
370
606
 
371
607
  #### Changed
608
+
372
609
  - Changed the default for:
610
+
373
611
  ```rb
374
612
  config.raise_on_prerender_error = Rails.env.development?
375
613
  ```
@@ -378,28 +616,37 @@ by [ashgaliyev](https://github.com/ashgaliyev).
378
616
  [PR 1145](https://github.com/shakacode/react_on_rails/pull/1145) by [justin808](https://github.com/justin808).
379
617
 
380
618
  ### 11.2.0 - 2018-12-06
619
+
381
620
  Do not use. Unpublished. Caused by an issue with the release script.
382
621
 
383
622
  ### [11.1.8] - 2018-10-14
384
623
 
385
624
  #### Improved
625
+
386
626
  - 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).
387
627
 
388
628
  ### [11.1.7] - 2018-10-10
629
+
389
630
  #### Fixed
631
+
390
632
  - Fixed bug where intl parsing would fail when trying to parse integers or blank entries. by [sepehr500](https://github.com/sepehr500)
391
633
 
392
634
  ### [11.1.6] - 2018-10-05
635
+
393
636
  #### Fixed
637
+
394
638
  - 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).
395
639
 
396
640
  ### [11.1.5] - 2018-10-03
641
+
397
642
  #### Fixed
398
- - 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).
643
+
644
+ - 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).
399
645
 
400
646
  ### [11.1.4] - 2018-09-12
401
647
 
402
648
  #### Fixed
649
+
403
650
  - Ignore Arrays in Rails i18n yml files. [PR 1129](https://github.com/shakacode/react_on_rails/pull/1129) by [vcarel](https://github.com/vcarel).
404
651
  - 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).
405
652
  - Upgrade Babel version to 7 [PR 1141](https://github.com/shakacode/react_on_rails/pull/1141) by [Ryunosuke Sato](https://github.com/tricknotes).
@@ -407,62 +654,83 @@ Do not use. Unpublished. Caused by an issue with the release script.
407
654
  ### [11.1.3] - 2018-08-26
408
655
 
409
656
  #### Fixed
657
+
410
658
  - 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).
411
659
  - Add support for webpacker 4 prereleases. [PR 1134](https://github.com/shakacode/react_on_rails/pull/1134) by [Judahmeek](https://github.com/Judahmeek))
412
660
 
413
661
  ### [11.1.2] - 2018-08-18
414
662
 
415
663
  #### Fixed
664
+
416
665
  - Tests now properly exit if the config.build_test_command fails!
417
666
  - Source path for project using Webpacker would default to "app/javascript" even if when the node_modules
418
667
  directory was set to "client". Fix now makes the configuration of this crystal clear.
419
668
  - renamed method RenderOptions.has_random_dom_id? to RenderOptions.random_dom_id? for rubocop rule.
420
- [PR 1133](https://github.com/shakacode/react_on_rails/pull/1133) by [justin808](https://github.com/justin808)
669
+ [PR 1133](https://github.com/shakacode/react_on_rails/pull/1133) by [justin808](https://github.com/justin808)
421
670
 
422
671
  ### [11.1.1] - 2018-08-09
672
+
423
673
  #### Fixed
674
+
424
675
  - `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).
425
676
 
426
677
  ### [11.1.0] - 2018-08-07
678
+
427
679
  #### Added
680
+
428
681
  - 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)
429
- * Added configuration option random_dom_id
430
- * Added method RenderOptions has_random_dom_id?
682
+ - Added configuration option random_dom_id
683
+ - Added method RenderOptions has_random_dom_id?
684
+
431
685
  #### Fixed
686
+
432
687
  - Fix invalid warn directive. [PR 1123](https://github.com/shakacode/react_on_rails/pull/1123) by [mustangostang](https://github.com/mustangostang).
433
688
 
434
689
  ### [11.0.10] - 2018-07-22
690
+
435
691
  #### Fixed
692
+
436
693
  - 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).
437
694
  - Properly clearing hydrated stores when server rendering. [PR 1120](https://github.com/shakacode/react_on_rails/pull/1120) by [squadette](https://github.com/squadette).
438
695
 
439
696
  ### [11.0.9] - 2018-06-24
440
- - 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).
697
+
698
+ - 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).
441
699
 
442
700
  ### [11.0.8] - 2018-06-15
701
+
443
702
  #### Fixed
703
+
444
704
  - 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).
445
705
  - 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).
446
706
  - Fix test helper determination of stale assets. [PR 1093](https://github.com/shakacode/react_on_rails/pull/1093) by [justin808](https://github.com/justin808).
447
707
 
448
708
  #### Changed
709
+
449
710
  - 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).
450
711
 
451
712
  ### [11.0.7] - 2018-05-16
713
+
452
714
  #### Fixed
715
+
453
716
  - Fix npm publishing. [PR 1090](https://github.com/shakacode/react_on_rails/pull/1090) by [justin808](https://github.com/justin808).
454
717
 
455
718
  ### [11.0.6] - 2018-05-15
719
+
456
720
  #### Changed
721
+
457
722
  - 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).
458
723
 
459
724
  ### [11.0.5] - 2018-05-11
725
+
460
726
  #### Changed
727
+
461
728
  - More detailed errors for Honeybadger and Sentry. [PR 1081](https://github.com/shakacode/react_on_rails/pull/1081) by [justin808](https://github.com/justin808).
462
729
 
463
730
  ### [11.0.4] - 2018-05-3
464
731
 
465
732
  #### Changed
733
+
466
734
  - 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
467
735
  - Fix the setup for tests for spec/dummy so they automatically rebuild by correctly setting the source_path in the webpacker.yml
468
736
  - Updated documentation for the testing setup.
@@ -472,48 +740,56 @@ Do not use. Unpublished. Caused by an issue with the release script.
472
740
  ### [11.0.3] - 2018-04-24
473
741
 
474
742
  #### Fixed
743
+
475
744
  - 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).
476
745
 
477
746
  ### [11.0.2] - 2018-04-24
478
747
 
479
748
  #### Fixed
749
+
480
750
  - 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).
481
751
 
482
752
  ### [11.0.1] - 2018-04-23
483
753
 
484
754
  #### Added
755
+
485
756
  - `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).
486
757
 
487
758
  #### Fixed
759
+
488
760
  - Missing class when throwing some error messages. [PR 1068](https://github.com/shakacode/react_on_rails/pull/1068) by [justin808](https://github.com/justin808).
489
761
 
490
762
  ### [11.0.0] - 2018-04-21
491
763
 
492
764
  ## MIGRATION for v11
765
+
493
766
  - 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.
494
767
  - 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".
495
768
  - Removed ENV["TRACE_REACT_ON_RAILS"] usage and replacing it with config.trace.
496
769
 
497
770
  #### Enhancements: Better Error Messages, Support for React on Rails Pro
771
+
498
772
  - Tracing (debugging) options are simplified with a single `config.trace` setting that defaults to true for development and false otherwise.
499
773
  - 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.
500
774
  - Errors raised are of type ReactOnRailsError, so you can see they came from React on Rails for debugging.
501
775
  - Removed ReactOnRails::Utils.server_bundle_file_name and ReactOnRails::Utils.bundle_file_name.
502
776
  - No longer logging the `railsContext` when server logging.
503
777
  - Rails.env is provided in the default railsContext, as suggested in [issue #697](https://github.com/shakacode/react_on_rails/issues/697).
504
- [PR 1065](https://github.com/shakacode/react_on_rails/pull/1065) by [justin808](https://github.com/justin808).
778
+ [PR 1065](https://github.com/shakacode/react_on_rails/pull/1065) by [justin808](https://github.com/justin808).
505
779
 
506
780
  #### Fixes
781
+
507
782
  - More exact version checking. We keep the react_on_rails gem and the react-on-rails node package at
508
- the same exact versions so that we can be sure that the interaction between them is precise.
509
- This is so that if a bug is detected after some update, it's critical that
510
- both the gem and the node package get the updates. This change ensures that the package.json specification does not use a
511
- ~ 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).
783
+ the same exact versions so that we can be sure that the interaction between them is precise.
784
+ This is so that if a bug is detected after some update, it's critical that
785
+ both the gem and the node package get the updates. This change ensures that the package.json specification does not use a
786
+ ~ 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).
512
787
  - 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).
513
788
 
514
789
  ### [10.1.4] - 2018-04-11
515
790
 
516
791
  #### Fixed
792
+
517
793
  - 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).
518
794
 
519
795
  - 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).
@@ -521,32 +797,45 @@ both the gem and the node package get the updates. This change ensures that the
521
797
  - 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).
522
798
 
523
799
  ### [10.1.3] - 2018-02-28
800
+
524
801
  #### Fixed
802
+
525
803
  - 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).
526
804
 
527
805
  ### [10.1.2] - 2018-02-27
806
+
528
807
  #### Fixed
808
+
529
809
  - 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).
530
810
 
531
811
  ### [10.1.1] - 2018-01-26
812
+
532
813
  #### Fixed
814
+
533
815
  - Fixed issue with server-rendering error handler: [PR 1020](https://github.com/shakacode/react_on_rails/pull/1020) by [jblasco3](https://github.com/jblasco3).
534
816
 
535
817
  ### [10.1.0] - 2018-01-23
818
+
536
819
  #### Added
820
+
537
821
  - Added 2 cache helpers: ReactOnRails::Utils.bundle_file_name(bundle_name) and ReactOnRails::Utils.server_bundle_file_name
538
- 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).
822
+ 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).
539
823
 
540
824
  #### Fixed
541
- - 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).
825
+
826
+ - 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).
542
827
  - 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)
543
828
 
544
829
  ### [10.0.2] - 2017-11-10
830
+
545
831
  #### Fixed
832
+
546
833
  - Remove unnecessary dependencies from released NPM package: [PR 968](https://github.com/shakacode/react_on_rails/pull/968) by [tricknotes](https://github.com/tricknotes).
547
834
 
548
835
  ### [10.0.1] - 2017-10-28
836
+
549
837
  #### Fixed
838
+
550
839
  - 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).
551
840
  - 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).
552
841
  - 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).
@@ -554,58 +843,78 @@ for easy access to the hashed filenames for use in cache keys. [PR 1018](https:/
554
843
  - Fixed and improved I18n directories checks: [PR 967](https://github.com/shakacode/react_on_rails/pull/967) by [railsme](https://github.com/railsme)
555
844
 
556
845
  ### [10.0.0] - 2017-10-08
846
+
557
847
  #### Created
848
+
558
849
  - Created `react_component_hash` method for react_helmet support.
850
+
559
851
  #### Deprecated
852
+
560
853
  - Deprecated `react_component` functionality for react_helmet support.
561
- To clarify, the method itself is not deprecated, only certain functionality which has been moved to `react_component_hash`
562
- [PR 951](https://github.com/shakacode/react_on_rails/pull/951) by [Judahmeek](https://github.com/Judahmeek).
854
+ To clarify, the method itself is not deprecated, only certain functionality which has been moved to `react_component_hash`
855
+ [PR 951](https://github.com/shakacode/react_on_rails/pull/951) by [Judahmeek](https://github.com/Judahmeek).
563
856
 
564
857
  ### [9.0.3] - 2017-09-20
858
+
565
859
  #### Improved
860
+
566
861
  - Improved comments in generated Procfile.dev-server. [PR 940](https://github.com/shakacode/react_on_rails/pull/940) by [justin808](https://github.com/justin808).
567
862
 
568
863
  ### [9.0.2] - 2017-09-10
864
+
569
865
  #### Fixed
866
+
570
867
  - Improved post install doc comments for generator. [PR 933](https://github.com/shakacode/react_on_rails/pull/933) by [justin808](https://github.com/justin808).
571
868
 
572
869
  ### [9.0.1] - 2017-09-10
573
870
 
574
871
  #### Fixed
872
+
575
873
  - Fixes Rails 3.2 compatability issues. [PR 926](https://github.com/shakacode/react_on_rails/pull/926) by [morozovm](https://github.com/morozovm).
576
874
 
577
875
  ### [9.0.0] - 2017-09-06
578
- 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).
579
876
 
877
+ 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).
580
878
 
581
879
  #### 9.0 from 8.x. Upgrade Instructions
880
+
582
881
  Moved to [our documentation](https://www.shakacode.com/react-on-rails/docs/guides/upgrading-react-on-rails#upgrading-to-version-9).
583
882
 
584
883
  ### [8.0.7] - 2017-08-16
884
+
585
885
  #### Fixed
886
+
586
887
  - 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).
587
888
 
588
889
  ### [8.0.6] - 2017-07-19
890
+
589
891
  #### Fixed
892
+
590
893
  - 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.
591
- - 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)
894
+ - 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)
592
895
  - 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).
593
896
 
594
897
  ## [8.0.5] - 2017-07-04
898
+
595
899
  #### Fixed
596
- - 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).
597
- - Remove contentBase deprecation warning message. [#878](https://github.com/shakacode/react_on_rails/pull/878) by [ened ](https://github.com/ened).
598
- - 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).
599
- - All tests run against Rails 5.1.2
600
900
 
601
- *Note: 8.0.4 skipped.*
901
+ - 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).
902
+ - Remove contentBase deprecation warning message. [#878](https://github.com/shakacode/react_on_rails/pull/878) by [ened ](https://github.com/ened).
903
+ - 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).
904
+ - All tests run against Rails 5.1.2
905
+
906
+ _Note: 8.0.4 skipped._
602
907
 
603
908
  ## [8.0.3] - 2017-06-19
909
+
604
910
  #### Fixed
911
+
605
912
  - 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)
606
913
 
607
914
  ## [8.0.2] - 2017-06-04
915
+
608
916
  #### Fixed
917
+
609
918
  - Any failure in webpack to build test files quits tests.
610
919
  - Fixed a Ruby 2.4 potential crash which could cause a crash due to pathname change in Ruby 2.4.
611
920
  - CI Improvements:
@@ -616,10 +925,13 @@ Moved to [our documentation](https://www.shakacode.com/react-on-rails/docs/guide
616
925
  - [#862](https://github.com/shakacode/react_on_rails/pull/862) by [justin808](https://github.com/justin808)
617
926
 
618
927
  ## [8.0.1] - 2017-05-30
928
+
619
929
  #### Fixed
930
+
620
931
  - Generator no longer modifies `assets.rb`. [#859](https://github.com/shakacode/react_on_rails/pull/859) by [justin808](https://github.com/justin808)
621
932
 
622
933
  ## [8.0.0] - 2017-05-29
934
+
623
935
  - Generators and full support for [webpacker_lite](https://github.com/shakacode/webpacker_lite)
624
936
  - 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`:
625
937
  ```
@@ -629,21 +941,26 @@ Moved to [our documentation](https://www.shakacode.com/react-on-rails/docs/guide
629
941
  - For a simple example of the webpacker_lite setup, run the basic generator.
630
942
 
631
943
  ## [8.0.0-beta.3] - 2017-05-27
944
+
632
945
  #### Changed
946
+
633
947
  - 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)
634
948
  - 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)
635
949
 
636
950
  ## [8.0.0-beta.2] - 2017-05-08
637
951
 
638
952
  #### Changed
953
+
639
954
  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).
640
955
 
641
956
  ## [8.0.0-beta.1] - 2017-05-03
642
957
 
643
958
  #### Added
959
+
644
960
  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).
645
961
 
646
962
  #### Changed
963
+
647
964
  Breaking change is that the default value of symlink_non_digested_assets_regex has changed from this
648
965
  old value to nil. This is a breaking change if you didn't have this value set in your
649
966
  config/initializers/react_on_rails.rb file and you need this because you're using webpack's CSS
@@ -654,90 +971,119 @@ symlink_non_digested_assets_regex: /\.(png|jpg|jpeg|gif|tiff|woff|ttf|eot|svg|ma
654
971
  ```
655
972
 
656
973
  ## [7.0.4] - 2017-04-27
974
+
657
975
  - 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)
658
976
 
659
977
  ## [7.0.3] - 2017-04-27
978
+
660
979
  Same as 7.0.1.
661
980
 
662
981
  ## 7.0.2 - 2017-04-27
663
- *Accidental release of beta gem here*
982
+
983
+ _Accidental release of beta gem here_
664
984
 
665
985
  ## [7.0.1] - 2017-04-27
986
+
666
987
  #### Fixed
988
+
667
989
  - 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)
668
990
 
669
991
  ## [7.0.0] - 2017-04-25
992
+
670
993
  #### Changed
994
+
671
995
  - 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)
672
996
 
673
997
  #### Fixed
998
+
674
999
  - 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)
675
1000
 
676
1001
  ## [6.10.1] - 2017-04-23
1002
+
677
1003
  #### Fixed
1004
+
678
1005
  - 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).
679
1006
 
680
1007
  ## [6.10.0] - 2017-04-13
681
1008
 
682
1009
  #### Added
1010
+
683
1011
  - 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).
684
1012
 
685
1013
  #### Fixed
1014
+
686
1015
  - 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).
687
1016
 
688
1017
  ## [6.9.3] - 2017-04-03
689
1018
 
690
1019
  #### Fixed
1020
+
691
1021
  - 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).
692
1022
 
693
1023
  ## [6.9.2] - 2017-04-02
694
1024
 
695
1025
  #### Changed
1026
+
696
1027
  - 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).
697
1028
 
698
1029
  #### Fixed
1030
+
699
1031
  - Remove pretty formatting of JSON in development. [#789](https://github.com/shakacode/react_on_rails/pull/789) by [justin808](https://github.com/justin808)
700
1032
  - Clear hydrated stores with each server rendered block. [#785](https://github.com/shakacode/react_on_rails/pull/785) by [udovenko](https://github.com/udovenko)
701
1033
 
702
1034
  ## [6.9.1] - 2017-03-30
703
1035
 
704
1036
  #### Fixed
1037
+
705
1038
  - Fixes Crash in Development for String Props. [#784](https://github.com/shakacode/react_on_rails/issues/784) by [justin808](https://github.com/justin808).
706
1039
 
707
1040
  ## [6.9.0] - 2017-03-29
708
1041
 
709
1042
  #### Fixed
1043
+
710
1044
  - Fixed error in the release script. [#767](https://github.com/shakacode/react_on_rails/issues/767) by [isolo](https://github.com/isolo).
711
1045
 
712
1046
  #### Changed
1047
+
713
1048
  - 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).
714
1049
 
715
1050
  #### Added
1051
+
716
1052
  - 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.
717
- [#777](https://github.com/shakacode/react_on_rails/pull/777) by [danijel](https://github.com/danijel).
1053
+ [#777](https://github.com/shakacode/react_on_rails/pull/777) by [danijel](https://github.com/danijel).
718
1054
 
719
1055
  ## [6.8.2] - 2017-03-24
1056
+
720
1057
  #### Fixed
1058
+
721
1059
  - 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).
722
1060
 
723
1061
  ## [6.8.1] - 2017-03-21
1062
+
724
1063
  #### Fixed
725
- - 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).
1064
+
1065
+ - 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).
726
1066
 
727
1067
  ## [6.8.0] - 2017-03-06
1068
+
728
1069
  ## Added
1070
+
729
1071
  - 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).
730
1072
 
731
1073
  ## [6.7.2] - 2017-03-05
1074
+
732
1075
  #### Improved
1076
+
733
1077
  - 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).
734
1078
 
735
1079
  ## [6.7.1] - 2017-02-28
1080
+
736
1081
  No changes other than a test fix.
737
1082
 
738
1083
  ## [6.7.0] - 2017-02-28
739
1084
 
740
1085
  #### IMPORTANT
1086
+
741
1087
  - 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:
742
1088
 
743
1089
  ```
@@ -751,72 +1097,99 @@ config.i18n_dir = Rails.root.join("client", "app", "libs", "i18n")
751
1097
  ```
752
1098
 
753
1099
  #### Added
1100
+
754
1101
  - 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).
755
1102
 
756
1103
  #### Fixed
1104
+
757
1105
  - 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).
758
1106
  - Fix spec failing due to duplicate component. [#734](https://github.com/shakacode/react_on_rails/pull/734) by [hrishimittal](https://github.com/hrishimittal).
759
1107
 
760
1108
  ## [6.6.0] - 2017-02-18
1109
+
761
1110
  #### Added
1111
+
762
1112
  - Switched to yarn! [#715](https://github.com/shakacode/react_on_rails/pull/715) by [squadette](https://github.com/squadette).
763
1113
 
764
1114
  ## [6.5.1] - 2017-02-11
1115
+
765
1116
  #### Fixed
1117
+
766
1118
  - Allow using gem without sprockets. [#671](https://github.com/shakacode/react_on_rails/pull/671) by [fc-arny](https://github.com/fc-arny).
767
1119
  - 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).
768
1120
  - Small formatting fix for errors [#703](https://github.com/shakacode/react_on_rails/pull/703) by [justin808](https://github.com/justin808).
769
1121
 
770
1122
  ## [6.5.0] - 2017-01-31
1123
+
771
1124
  #### Added
1125
+
772
1126
  - 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).
773
1127
 
774
1128
  #### Fixed
1129
+
775
1130
  - Fix incorrect "this" references of Node.js SSR [#690](https://github.com/shakacode/react_on_rails/issues/689) by [nostophilia](https://github.com/nostophilia).
776
1131
 
777
1132
  ## [6.4.2] - 2017-01-17
1133
+
778
1134
  #### Fixed
1135
+
779
1136
  - 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).
780
1137
 
781
1138
  ## [6.4.1] - 2017-1-17
1139
+
782
1140
  No changes.
783
1141
 
784
1142
  ## [6.4.0] - 2017-1-12
785
1143
 
786
1144
  #### Possible Breaking Change
1145
+
787
1146
  - 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.
788
1147
 
789
1148
  #### Fixed
1149
+
790
1150
  - Removed foreman as a dependency. [#678](https://github.com/shakacode/react_on_rails/pull/678) by [x2es](https://github.com/x2es).
791
1151
 
792
1152
  #### Added
793
- - 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).
1153
+
1154
+ - 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).
794
1155
 
795
1156
  ## [6.3.5] - 2017-1-6
1157
+
796
1158
  #### Fixed
797
- - 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).
1159
+
1160
+ - 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).
798
1161
 
799
1162
  ## [6.3.4] - 2016-12-25
1163
+
800
1164
  ##### Fixed
1165
+
801
1166
  - Disable Turbolinks support when not supported. [#650](https://github.com/shakacode/react_on_rails/pull/650) by [ka2n](https://github.com/ka2n).
802
1167
 
803
1168
  ## [6.3.3] - 2016-12-25
1169
+
804
1170
  ##### Fixed
1171
+
805
1172
  - 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).
806
1173
  - Added support for Ruby 2.0 [#651](https://github.com/shakacode/react_on_rails/pull/651) by [bbonamin](https://github.com/bbonamin).
807
1174
 
808
1175
  ## [6.3.2] - 2016-12-5
1176
+
809
1177
  ##### Fixed
1178
+
810
1179
  - 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).
811
1180
  - "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)
812
1181
  - 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).
813
1182
 
814
1183
  ## [6.3.1] - 2016-11-30
1184
+
815
1185
  ##### Changed
1186
+
816
1187
  - Improved generator post-install help messages. [#631](https://github.com/shakacode/react_on_rails/pull/631) by [justin808](https://github.com/justin808).
817
1188
 
818
1189
  ## [6.3.0] - 2016-11-30
1190
+
819
1191
  ##### Changed
1192
+
820
1193
  - 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).
821
1194
 
822
1195
  - Updated Basic Generator & Linters. Examples are simpler. [#624](https://github.com/shakacode/react_on_rails/pull/624) by [Judahmeek](https://github.com/Judahmeek).
@@ -826,65 +1199,88 @@ No changes.
826
1199
  - Don't assume ActionMailer is available. [#608](https://github.com/shakacode/react_on_rails/pull/608) by [tuzz](https://github.com/tuzz).
827
1200
 
828
1201
  ## [6.2.1] - 2016-11-19
1202
+
829
1203
  - 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)
830
1204
 
831
1205
  - 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).
832
1206
 
833
1207
  ## [6.2.0] - 2016-11-19
1208
+
834
1209
  ##### Changed
835
- - 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).
1210
+
1211
+ - 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).
836
1212
 
837
1213
  ## [6.1.2] - 2016-10-24
1214
+
838
1215
  ##### Fixed
1216
+
839
1217
  - 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).
840
1218
 
841
1219
  ## [6.1.1] - 2016-09-09
1220
+
842
1221
  ##### Fixed
1222
+
843
1223
  - 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).
844
1224
 
845
1225
  ## [6.1.0] - 2016-08-21
846
1226
 
847
1227
  ##### Added
1228
+
848
1229
  - 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).
849
1230
  - 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).
850
1231
  - 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).
851
1232
  - 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).
852
1233
 
853
1234
  ##### Fixed
1235
+
854
1236
  - 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).
855
1237
  - 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).
856
1238
  - 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)
857
1239
 
858
1240
  ## [6.0.5] - 2016-07-11
1241
+
859
1242
  ##### Added
860
- - 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).
1243
+
1244
+ - 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).
861
1245
 
862
1246
  ## [6.0.4] - 2016-06-13
1247
+
863
1248
  ##### Fixed
864
- - 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)
1249
+
1250
+ - 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)
865
1251
 
866
1252
  ## [6.0.3] - 2016-06-07
1253
+
867
1254
  ##### Fixed
1255
+
868
1256
  - 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).
869
1257
 
870
1258
  ## [6.0.2] - 2016-06-06
1259
+
871
1260
  ##### Fixed
1261
+
872
1262
  - 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).
873
1263
 
874
1264
  ## [6.0.1] - 2016-05-27
1265
+
875
1266
  ##### Fixed
1267
+
876
1268
  - 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).
877
1269
 
878
1270
  ## [6.0.0] - 2016-05-25
1271
+
879
1272
  ##### Breaking Changes
1273
+
880
1274
  - 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.
881
1275
  [#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).
882
1276
  - **Migration to v6**
1277
+
883
1278
  - Do not run the generator again if you've already run it.
884
1279
 
885
- - 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.
1280
+ - 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.
886
1281
 
887
1282
  - To configure the asset compilation you can either
1283
+
888
1284
  1. Specify a `config/react_on_rails` setting for `build_production_command` to be nil to turn this feature off.
889
1285
  2. Specify the script command you want to run to build your production assets, and remove your `assets.rake` file.
890
1286
 
@@ -893,6 +1289,7 @@ No changes.
893
1289
  - 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.
894
1290
 
895
1291
  Here is the addition to the generated config file:
1292
+
896
1293
  ```ruby
897
1294
  # This configures the script to run to build the production assets by webpack. Set this to nil
898
1295
  # if you don't want react_on_rails building this file for you.
@@ -905,48 +1302,61 @@ Here is the addition to the generated config file:
905
1302
  ```
906
1303
 
907
1304
  ##### Fixed
1305
+
908
1306
  - 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)
909
1307
  - 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)
910
1308
 
911
1309
  ##### Added
1310
+
912
1311
  - 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).
913
1312
  - 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).
914
1313
  - 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).
915
1314
  - 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).
916
1315
 
917
1316
  ##### Changed
1317
+
918
1318
  - [#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:
919
1319
  - Only one webpack config is generated for server and client config. Package.json files were changed to reflect this.
920
1320
  - Added npm_build_test_command to allow developers to change what npm command is automatically run from rspec.
921
1321
  - Replace URI with Addressable gem. See [#405](https://github.com/shakacode/react_on_rails/pull/405) by [lucke84](https://github.com/lucke84)
922
1322
 
923
1323
  ##### Removed
1324
+
924
1325
  - [#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:
925
1326
  - Server rendering is no longer an option in the generator and is always accessible.
926
1327
  - Removed lodash, jquery, and loggerMiddleware from the generated code.
927
1328
  - Removed webpack watch check for test helper automatic compilation.
928
1329
 
929
1330
  ## [5.2.0] - 2016-04-08
1331
+
930
1332
  ##### Added
1333
+
931
1334
  - 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).
932
1335
  - 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)
933
1336
 
934
1337
  ##### Removed
1338
+
935
1339
  - Generator removals to simplify installer. See [#364](https://github.com/shakacode/react_on_rails/pull/364) by [jbhatab](https://github.com/jbhatab).
936
1340
  - Removed options for heroku, boostrap, and the linters from generator.
937
1341
  - 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.
938
1342
  - Documentation added for removed installer options.
939
1343
 
940
1344
  ## [5.1.1] - 2016-04-04
1345
+
941
1346
  ##### Fixed
1347
+
942
1348
  - 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)
943
1349
 
944
1350
  ##### Added
1351
+
945
1352
  - railsContext includes the port number and a boolean if the code is being run on the server or client.
946
1353
 
947
1354
  ## [5.1.0] - 2016-04-03
1355
+
948
1356
  ##### Added
1357
+
949
1358
  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).
1359
+
950
1360
  - Generator enhancements
951
1361
  - Generator adds line to spec/rails_helper.rb so that running specs will ensure assets are compiled.
952
1362
  - Other small changes to the generator including adding necessary npm scripts to allow React on Rails to build assets.
@@ -962,149 +1372,192 @@ All 5.1.0 changes can be found in [#362](https://github.com/shakacode/react_on_r
962
1372
  ## [5.0.0] - 2016-04-01
963
1373
 
964
1374
  ##### Added
965
- - 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)
1375
+
1376
+ - 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)
966
1377
 
967
1378
  ##### Changed
968
- - 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.
1379
+
1380
+ - 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.
969
1381
 
970
1382
  ##### Breaking Changes
1383
+
971
1384
  - 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).
972
1385
 
973
1386
  ## [4.0.3] - 2016-03-17
974
1387
 
975
1388
  ##### Fixed
1389
+
976
1390
  - `ReactOnRailsHelper#react_component`: Invalid deprecation message when called with only one parameter, the component name.
977
1391
 
978
1392
  ## [4.0.2] - 2016-03-17
979
1393
 
980
1394
  ##### Fixed
1395
+
981
1396
  - `ReactOnRails::Controller#redux_store`: 2nd parameter changed to a named parameter `props` for consistency.
982
1397
 
983
1398
  ## [4.0.1] - 2016-03-16
984
1399
 
985
1400
  ##### Fixed
1401
+
986
1402
  - 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.
987
1403
 
988
1404
  ## [4.0.0] - 2016-03-14
989
1405
 
990
1406
  ##### Added
1407
+
991
1408
  - [spec/dummy](spec/dummy) is a full sample app of React on Rails techniques **including** the hot reloading of assets from Rails!
992
1409
  - 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)
993
1410
  - Added optional parameter for ReactOnRails.getStore(name, throwIfMissing = true) so that you can check if a store is defined easily.
994
- - Added controller `module ReactOnRails::Controller`. Adds method `redux_store` to setup redux stores in the view.
1411
+ - Added controller `module ReactOnRails::Controller`. Adds method `redux_store` to set up Redux stores in the view.
995
1412
  - 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.
996
1413
  - 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.
997
1414
  - The checker for outdated bundles before running tests will two configuration options: `generated_assets_dir` and `webpack_generated_files`.
998
1415
  - Better support for Turbolinks 5!
999
- - 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).
1416
+ - 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).
1000
1417
  - Added several parameters used for ensuring webpack assets are built for running tests:
1001
1418
  - `config.generated_assets_dir`: Directory where your generated webpack assets go. You can have only **one** directory for this.
1002
1419
  - `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.
1003
1420
 
1004
1421
  ##### Changed
1005
- - Generator default for webpack generated assets is now `app/assets/webpack` as we use this for both JavaScript and CSS generated assets.
1422
+
1423
+ - Generator default for webpack generated assets is now `app/assets/webpack` as we use this for both JavaScript and CSS generated assets.
1006
1424
 
1007
1425
  ##### Fixed
1426
+
1008
1427
  - The test runner "assets up to date checker" is greatly improved.
1009
1428
  - Lots of doc updates!
1010
1429
  - 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.
1011
1430
 
1012
1431
  ##### Breaking Changes
1013
- - 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.
1432
+
1433
+ - 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.
1014
1434
  - `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`.
1015
1435
  - `config.generated_assets_dirs` has been renamed to `config.generated_assets_dir` (singular) and it only takes one directory.
1016
1436
 
1017
1437
  ## [3.0.6] - 2016-03-01
1438
+
1018
1439
  ##### Fixed
1019
- - 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).
1440
+
1441
+ - 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).
1020
1442
 
1021
1443
  ## [3.0.5] - 2016-02-26
1444
+
1022
1445
  ##### Fixed
1023
- - 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).
1446
+
1447
+ - 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).
1024
1448
 
1025
1449
  ## [3.0.4] - 2016-02-25
1450
+
1026
1451
  ##### Fixed
1452
+
1027
1453
  - Updated CHANGELOG.md to include contributors for each PR.
1028
- - 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).
1454
+ - 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).
1029
1455
 
1030
1456
  ## [3.0.3] - 2016-02-21
1457
+
1031
1458
  ##### Fixed
1459
+
1032
1460
  - Cleaned up code in `spec/dummy` to latest React and Redux APIs. See [#282](https://github.com/shakacode/react_on_rails/pull/282).
1033
1461
  - Update generator messages with helpful information. See [#279](https://github.com/shakacode/react_on_rails/pull/279).
1034
1462
  - Other small generated comment fixes and doc fixes.
1035
1463
 
1036
1464
  ## [3.0.2] - 2016-02-15
1465
+
1037
1466
  ##### Fixed
1467
+
1038
1468
  - Fixed missing information in the helpful message after running the base install generator regarding how to run the node server with hot reloading support.
1039
1469
 
1040
1470
  ## [3.0.1] - 2016-02-15
1471
+
1041
1472
  ##### Fixed
1473
+
1042
1474
  - Fixed several jscs linter issues.
1043
1475
 
1044
1476
  ## [3.0.0] - 2016-02-15
1477
+
1045
1478
  ##### Fixed
1479
+
1046
1480
  - Fix Bootstrap Sass Append to Gemfile, missing new line. [#262](https://github.com/shakacode/react_on_rails/pull/262).
1047
1481
 
1048
1482
  ##### Added
1483
+
1049
1484
  - 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.
1050
1485
  - Added forman to gemspec in case new dev does not have it globally installed. [#248](https://github.com/shakacode/react_on_rails/pull/248).
1051
1486
  - Support for Turbolinks 5! [#270](https://github.com/shakacode/react_on_rails/pull/270).
1052
1487
  - Added better error messages for `ReactOnRails.register()`. [#273](https://github.com/shakacode/react_on_rails/pull/273).
1053
1488
 
1054
1489
  ##### Breaking Change
1490
+
1055
1491
  - Calls to `react_component` should use a named argument of props. For example, change this:
1492
+
1056
1493
  ```ruby
1057
1494
  <%= react_component("ReduxSharedStoreApp", {}, prerender: false, trace: true) %>
1058
1495
  ```
1059
1496
 
1060
1497
  to
1498
+
1061
1499
  ```ruby
1062
1500
  <%= react_component("ReduxSharedStoreApp", props: {}, prerender: false, trace: true) %>
1063
1501
  ```
1502
+
1064
1503
  You'll get a deprecation message to change this.
1065
- - 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).
1066
- - 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).
1504
+
1505
+ - 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).
1506
+ - 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).
1067
1507
 
1068
1508
  ##### Migration Steps v2 to v3
1509
+
1069
1510
  - 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`:
1511
+
1070
1512
  ```ruby
1071
1513
  RSpec.configure do |config|
1072
1514
  # Ensure that if we are running js tests, we are using latest webpack assets
1073
1515
  ReactOnRails::TestHelper.configure_rspec_to_compile_assets(config)
1074
1516
  ```
1517
+
1075
1518
  - 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).
1076
1519
 
1077
1520
  ## [2.3.0] - 2016-02-01
1521
+
1078
1522
  ##### Added
1523
+
1079
1524
  - Added polyfills for `setInterval` and `setTimeout` in case other libraries expect these to exist.
1080
1525
  - Added much improved debugging for errors in the server JavaScript webpack file.
1081
1526
  - See [#244](https://github.com/shakacode/react_on_rails/pull/244/) for these improvements.
1082
1527
 
1083
1528
  ## [2.2.0] - 2016-01-29
1529
+
1084
1530
  ##### Added
1531
+
1085
1532
  - 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).
1086
1533
 
1087
1534
  ## [2.1.1] - 2016-01-28
1088
1535
 
1089
1536
  ##### Fixed
1537
+
1090
1538
  - Fixed regression where apps that were not using Turbolinks would not render components on page load.
1091
1539
 
1092
1540
  ##### Added
1541
+
1093
1542
  - `ReactOnRails.render` returns a virtualDomElement Reference to your React component's backing instance. See [#234](https://github.com/shakacode/react_on_rails/pull/234).
1094
1543
  - `debug_turbolinks` helper for debugging turbolinks issues. See [turbolinks](https://www.shakacode.com/react-on-rails/docs/rails/turbolinks).
1095
1544
  - Enhanced regression testing for non-turbolinks apps. Runs all tests for dummy app with turbolinks both disabled and enabled.
1096
1545
 
1097
1546
  ## [2.1.0] - 2016-01-26
1547
+
1098
1548
  ##### Added
1549
+
1099
1550
  - 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)
1100
1551
  - 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)
1101
1552
  - 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)
1102
1553
  - 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)
1103
1554
 
1104
1555
  ##### Changed
1556
+
1105
1557
  - Changed message when running the dev (a.k.a. "express" server). [#227](https://github.com/shakacode/react_on_rails/commit/543ae70254d0c7b477e2c92af86f40746e58a431)
1106
1558
 
1107
1559
  ##### Fixed
1560
+
1108
1561
  - 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)
1109
1562
  - Fixed issue with already initialized constant warning appearing when starting a Rails server [#226](https://github.com/shakacode/react_on_rails/pull/226)
1110
1563
  - Fixed to make backwards compatible with Ruby v2.0 and updated all Ruby and Node dependencies.
@@ -1112,21 +1565,27 @@ RSpec.configure do |config|
1112
1565
  ---
1113
1566
 
1114
1567
  ## [2.0.2]
1568
+
1115
1569
  - Added better messages after generator runs. [#210](https://github.com/shakacode/react_on_rails/pull/210)
1116
1570
 
1117
1571
  ## [2.0.1]
1572
+
1118
1573
  - Fixed bug with version matching between gem and npm package.
1119
1574
 
1120
1575
  ## [2.0.0]
1576
+
1121
1577
  - Move JavaScript part of react_on_rails to npm package 'react-on-rails'.
1122
1578
  - Converted JavaScript code to ES6! with tests!
1123
1579
  - No global namespace pollution. ReactOnRails is the only global added.
1124
1580
  - 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:
1581
+
1125
1582
  ```
1126
1583
  import ReactOnRails from 'react-on-rails';
1127
1584
  ReactOnRails.register({name: component});
1128
1585
  ```
1586
+
1129
1587
  Best done with Object destructing:
1588
+
1130
1589
  ```
1131
1590
  import ReactOnRails from 'react-on-rails';
1132
1591
  ReactOnRails.register(
@@ -1136,26 +1595,35 @@ Best done with Object destructing:
1136
1595
  }
1137
1596
  );
1138
1597
  ```
1139
- Previously, you used
1140
- ```
1141
- window.Component1 = Component1;
1142
- window.Component2 = Component2;
1143
- ```
1144
- This would pollute the global namespace. See details in the README.md for more information.
1598
+
1599
+ Previously, you used
1600
+
1601
+ ```
1602
+ window.Component1 = Component1;
1603
+ window.Component2 = Component2;
1604
+ ```
1605
+
1606
+ This would pollute the global namespace. See details in the README.md for more information.
1607
+
1145
1608
  - Your jade template for the WebpackDevServer setup should use the new API:
1609
+
1146
1610
  ```
1147
1611
  ReactOnRails.render(componentName, props, domNodeId);
1148
1612
  ```
1149
- such as:
1613
+
1614
+ such as:
1615
+
1150
1616
  ```
1151
1617
  ReactOnRails.render("HelloWorldApp", {name: "Stranger"}, 'app');
1152
1618
  ```
1619
+
1153
1620
  - All npm dependency libraries updated. Most notable is going to Babel 6.
1154
- - Dropped support for react 0.13.
1621
+ - Dropped support for React 0.13.
1155
1622
  - JS Linter uses ShakaCode JavaScript style: https://github.com/shakacode/style-guide-javascript
1156
- - Generators account these differences.
1623
+ - Generators account for these differences.
1157
1624
 
1158
1625
  ##### Migration Steps v1 to v2
1626
+
1159
1627
  [Example of upgrading](https://github.com/shakacode/react-webpack-rails-tutorial/commit/5b1b8698e8daf0f0b94e987740bc85ee237ef608)
1160
1628
 
1161
1629
  1. Update the `react_on_rails` gem.
@@ -1171,7 +1639,9 @@ Best done with Object destructing:
1171
1639
  ---
1172
1640
 
1173
1641
  ## [1.2.2]
1642
+
1174
1643
  ##### Fixed
1644
+
1175
1645
  - Missing Lodash from generated package.json [#175](https://github.com/shakacode/react_on_rails/pull/175)
1176
1646
  - Rails 3.2 could not run generators [#182](https://github.com/shakacode/react_on_rails/pull/182)
1177
1647
  - Better placement of jquery_ujs dependency [#171](https://github.com/shakacode/react_on_rails/pull/171)
@@ -1179,31 +1649,40 @@ Best done with Object destructing:
1179
1649
  - Lots of better docs.
1180
1650
 
1181
1651
  ## [1.2.0]
1652
+
1182
1653
  ##### Added
1654
+
1183
1655
  - Support `--skip-bootstrap` or `-b` option for generator.
1184
1656
  - Create examples tasks to test generated example apps.
1185
1657
 
1186
1658
  ##### Fixed
1659
+
1187
1660
  - Fix non-server rendering configuration issues.
1188
1661
  - Fix application.js incorrect overwritten issue.
1189
1662
  - Fix Gemfile dependencies.
1190
1663
  - Fix several generator issues.
1191
1664
 
1192
1665
  ##### Removed
1666
+
1193
1667
  - Removed templates/client folder.
1194
1668
 
1195
1669
  ---
1196
1670
 
1197
1671
  ## [1.1.1] - 2015-11-28
1672
+
1198
1673
  ##### Added
1674
+
1199
1675
  - Support for React Router.
1200
1676
  - Error and redirect handling.
1201
1677
  - Turbolinks support.
1202
1678
 
1203
1679
  ##### Fixed
1680
+
1204
1681
  - Fix several generator-related issues.
1205
1682
 
1206
- [Unreleased]: https://github.com/shakacode/react_on_rails/compare/14.2.0...master
1683
+ [Unreleased]: https://github.com/shakacode/react_on_rails/compare/16.1.0...master
1684
+ [16.1.0]: https://github.com/shakacode/react_on_rails/compare/16.0.0...16.1.0
1685
+ [16.0.0]: https://github.com/shakacode/react_on_rails/compare/14.2.0...16.0.0
1207
1686
  [14.2.0]: https://github.com/shakacode/react_on_rails/compare/14.1.1...14.2.0
1208
1687
  [14.1.1]: https://github.com/shakacode/react_on_rails/compare/14.1.0...14.1.1
1209
1688
  [14.1.0]: https://github.com/shakacode/react_on_rails/compare/14.0.5...14.1.0