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 next version. NOTE: major versions of the npm module and the gem must be kept in sync.
Contributors: please follow the recommendations outlined at 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.
See Upgrading React on Rails for more concise instructions on upgrading.
Changes since last non-beta release.
Please add entries here for your pull requests that are not yet released.
11.0.7 - 2018-05-11
11.0.6 - 2018-05-11
- Even more detailed errors for Honeybadger and Sentry when there's a JSON parse error on server rendering. PR 1086 by justin808.
11.0.5 - 2018-05-11
11.0.4 - 2018-05-3
- 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
- Fix the setup for tests for spec/dummy so they automatically rebuild by correctly setting the source_path in the webpacker.yml
- Updated documentation for the testing setup.
- Above in PR 1072 by justin808.
prerender: truebecause it makes no sense to have react_component_hash not use prerrender. Improved docs on
react_component_hash. Also, fixed issue where checking gem existence. PR 1077 by justin808.
11.0.3 - 2018-04-24
- Fixed issue with component script initialization when using react_component_hash. PR 1071 by jblasco3.
11.0.2 - 2018-04-24
11.0.1 - 2018-04-23
11.0.0 - 2018-04-21
MIGRATION for v11
server_render_methodwas removed from the configuration. If you want to use a custom renderer, contact firstname.lastname@example.org. We have a custom node rendering solution in production for egghead.io.
- 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".
- Removed ENV["TRACE_REACT_ON_RAILS"] usage and replacing it with config.trace.
Enhancements: Better Error Messages, Support for React on Rails Pro
- Tracing (debugging) options are simplified with a single
config.tracesetting that defaults to true for development and false otherwise.
- Errors raised are of type ReactOnRailsError, so you can see they came from React on Rails for debugging.
- Removed ReactOnRails::Utils.server_bundle_file_name and ReactOnRails::Utils.bundle_file_name.
- No longer logging the
railsContextwhen server logging.
- Rails.env is provided in the default railsContext, as suggested in issue #697. PR 1065 by justin808.
- More exact version checking. We keep the react_on_rails gem and the react-on-rails node package at the same exact versions so that we can be sure that the interaction between them is precise. This is so that if a bug is detected after some update, it's critical that both the gem and the node package get the updates. This change ensures that the package.json specification does not use a ~ or ^ as reported in issue #1062. PR 1063 by justin808.
- Sprockets: Now use the most recent manifest when creating symlinks. See issue #1023. PR 1064 by justin808.
10.1.4 - 2018-04-11
10.1.3 - 2018-02-28
10.1.2 - 2018-02-27
- 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 by theJoeBiz.
10.1.1 - 2018-01-26
10.1.0 - 2018-01-23
- Added 2 cache helpers: ReactOnRails::Utils.bundle_file_name(bundle_name) and ReactOnRails::Utils.server_bundle_file_name for easy access to the hashed filenames for use in cache keys. PR 1018 by justin808.
- Use redux component in generated redux Hello World example: PR 1006 by lewaabahmad.
Utils.bundle_js_file_pathgenerating the incorrect path for
manifest.jsonin webpacker projects: Issue #1011 by elstgav
10.0.2 - 2017-11-10
10.0.1 - 2017-10-28
react_component_hashfunctionality in cases of prerendering errors: PR 960 by Judahmeek.
- Fix to add missing dependency to run generator spec individually: PR 962 by tricknotes.
- Fixes check for i18n_dir in LocalesToJs returning false when i18n_dir was set. PR 899 by hakongit.
- Fixed mistake in rubocop comments that led to errors when handling exceptions in ReactOnRails::ServerRendering::Exec PR 963 by railsme.
- Fixed and improved I18n directories checks: PR 967 by railsme
10.0.0 - 2017-10-08
react_component_hashmethod for react_helmet support.
react_componentfunctionality for react_helmet support. To clarify, the method itself is not deprecated, only certain functionality which has been moved to
react_component_hashPR 951 by Judahmeek.
9.0.3 - 2017-09-20
9.0.2 - 2017-09-10
9.0.1 - 2017-09-10
9.0.0 - 2017-09-06
9.0 from 8.x. Upgrade Instructions
Moved to our documentation.
8.0.7 - 2017-08-16
- Fixes generator bug by keeping blank line at top in case existing .gitignore does not end in a newline. #916 by justin808.
8.0.6 - 2017-07-19
- 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 by justin808. Be sure to update webpacker_lite to 2.1.0.
- 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 by jasonblalock.
8.0.5 - 2017-07-04
devBuildvalue for webpack production build from webpackConfigLoader. #877 by chenqingspring.
- Remove contentBase deprecation warning message. #878 by ened .
- Removes invalid reference to _railsContext in the generated files. #886 by justin808.
- All tests run against Rails 5.1.2
Note: 8.0.4 skipped.
8.0.3 - 2017-06-19
8.0.2 - 2017-06-04
- Any failure in webpack to build test files quits tests.
- Fixed a Ruby 2.4 potential crash which could cause a crash due to pathname change in Ruby 2.4.
- CI Improvements:
- Switched to yarn link and removed relative path install of react-on-rails
- Removed testing of Turbolinks 2
- All tests run against Rails 5.1.1
- Fixed test failures against Ruby 2.4
- #862 by justin808
8.0.1 - 2017-05-30
8.0.0 - 2017-05-29
- Generators and full support for webpacker_lite
- 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
- For an example of migration, see: react-webpack-rails-tutorial PR #395
- For a simple example of the webpacker_lite setup, run the basic generator.
8.0.0-beta.3 - 2017-05-27
- Major updates for WebpackerLite 2.0.2. #844 by justin808](https://github.com/justin808) with help from
- Logging no longer occurs when trace is turned to false. #845 by conturbo
8.0.0-beta.2 - 2017-05-08
8.0.0-beta.1 - 2017-05-03
Breaking change is that the default value of symlink_non_digested_assets_regex has changed from this old value to nil. This is a breaking change if you didn't have this value set in your config/initializers/react_on_rails.rb file and you need this because you're using webpack's CSS features and you have not switched to webpacker lite.
7.0.4 - 2017-04-27
7.0.3 - 2017-04-27
Same as 7.0.1.
7.0.2 - 2017-04-27
Accidental release of beta gem here
7.0.1 - 2017-04-27
7.0.0 - 2017-04-25
6.10.1 - 2017-04-23
- Improve json conversion with tests and support for older Rails 3.x. #787 by cheremukhin23 and Ynote.
6.10.0 - 2017-04-13
- Add an ability to return multiple HTML strings in a
Hashas a result of
react_componentmethod call. Allows to build
<head>contents with React Helmet. #800 by udovenko.
6.9.3 - 2017-04-03
6.9.2 - 2017-04-02
- Update version_checker.rb to
logger.warnfor gem/npm version mismatch. #788 by justin808.
- Remove pretty formatting of JSON in development. #789 by justin808
- Clear hydrated stores with each server rendered block. #785 by udovenko
6.9.1 - 2017-03-30
6.9.0 - 2017-03-29