react-on-rails
Advanced tools
Changelog
[3.0.2] - 2016-02-15
Changelog
[3.0.0] - 2016-02-15
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.ReactOnRails.register()
. #273.Calls to react_component
should use a named argument of props. For example, change this:
<%= react_component("ReduxSharedStoreApp", {}, prerender: false, trace: true) %>
to
<%= react_component("ReduxSharedStoreApp", props: {}, prerender: false, trace: true) %>
You'll get a deprecation message to change this.
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 for how to do this. #253.
You have to call ReactOnRails.register
to register react components. This was deprecated in v2. #273.
rails_helper.rb
:RSpec.configure do |config|
# Ensure that if we are running js tests, we are using latest webpack assets
ReactOnRails::TestHelper.configure_rspec_to_compile_assets(config)
props
. See forum post Using Regexp to update to ReactOnRails v3.Changelog
[2.2.0] - 2016-01-29
ReactOnRails.setOptions({ traceTurbolinks: true });
. Removed the file debug_turbolinks
added in 2.1.1. See #243.Changelog
[2.1.1] - 2016-01-28
ReactOnRails.render
returns a virtualDomElement Reference to your React component's backing instance. See #234.debug_turbolinks
helper for debugging turbolinks issues. See turbolinks.