diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d8e7ada5..e98f52f98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ Contributors: please follow the recommendations outlined at [keepachangelog.com] ## [Unreleased] *Please add entries here for your pull requests.* +## [6.3.3] - 2016-12-25 +- 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). + ## [6.3.2] - 2016-12-5 ##### Fixed - 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). @@ -404,7 +407,8 @@ Best done with Object destructing: ##### Fixed - Fix several generator related issues. -[Unreleased]: https://github.com/shakacode/react_on_rails/compare/6.3.2...master +[Unreleased]: https://github.com/shakacode/react_on_rails/compare/6.3.3...master +[6.3.3]: https://github.com/shakacode/react_on_rails/compare/6.3.2...6.3.3 [6.3.2]: https://github.com/shakacode/react_on_rails/compare/6.3.1...6.3.2 [6.3.1]: https://github.com/shakacode/react_on_rails/compare/6.3.0...6.3.1 [6.3.0]: https://github.com/shakacode/react_on_rails/compare/6.2.1...6.3.0 diff --git a/node_package/src/clientStartup.js b/node_package/src/clientStartup.js index 375b8ecdd..8fcb711d6 100644 --- a/node_package/src/clientStartup.js +++ b/node_package/src/clientStartup.js @@ -182,10 +182,9 @@ export function clientStartup(context) { reactOnRailsPageLoaded(); } else if (turbolinksVersion5()) { debugTurbolinks( - 'USING TURBOLINKS 5: document added event listeners turbolinks:before-cache and ' + - 'turbolinks:load.', - ); - document.addEventListener('turbolinks:before-cache', reactOnRailsPageUnloaded); + 'USING TURBOLINKS 5: document added event listeners ' + + ' turbolinks:before-visit and turbolinks:load.'); + document.addEventListener('turbolinks:before-visit', reactOnRailsPageUnloaded); document.addEventListener('turbolinks:load', reactOnRailsPageLoaded); } else { debugTurbolinks( diff --git a/spec/dummy/Gemfile b/spec/dummy/Gemfile index 7081328cd..81db57ded 100644 --- a/spec/dummy/Gemfile +++ b/spec/dummy/Gemfile @@ -12,8 +12,6 @@ gem 'sass-rails', '~> 5.0' gem 'uglifier', '>= 2.7.2' # Use CoffeeScript for .coffee assets and views gem 'coffee-rails', '~> 4.1.0' -# See https://github.com/rails/execjs#readme for more supported runtimes -# gem 'mini_racer', platforms: :ruby # Use jquery as the JavaScript library gem 'jquery-rails' diff --git a/spec/dummy/app/views/layouts/application.html.erb b/spec/dummy/app/views/layouts/application.html.erb index 202b1dc5c..e270efd69 100644 --- a/spec/dummy/app/views/layouts/application.html.erb +++ b/spec/dummy/app/views/layouts/application.html.erb @@ -3,6 +3,8 @@
+ Must call componentWillUnmount. +
+