react-on-rails
Advanced tools
Changelog
[6.0.2] - 2016-06-06
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. Fixed in #438 by Michael Baudino.Changelog
[6.0.1] - 2016-05-27
Changelog
[6.0.0] - 2016-05-25
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.
#398 by robwise, jbhatab, and justin808.
Migration to v6
Do not run the generator again if you've already run it.
See shakacode/react-webpack-rails-tutorial/pull/287 for an example of upgrading from v5.
To configure the asset compilation you can either
config/react_on_rails
setting for build_production_command
to be nil to turn this feature off.assets.rake
file.If you are using the ReactOnRails test helper, then you will need to add the 'config.npm_build_test_command' to your config to tell react_on_rails what command to run when you run rspec.
See shakacode/react-webpack-rails-tutorial #287 for an upgrade example. The PR has a few comments on the upgrade.
Here is the addition to the generated config file:
# This configures the script to run to build the production assets by webpack. Set this to nil
# if you don't want react_on_rails building this file for you.
config.build_production_command = "npm run build:production"
# If you are using the ReactOnRails::TestHelper.configure_rspec_to_compile_assets(config)
# with rspec then this controls what npm command is run
# to automatically refresh your webpack assets on every test run.
config.npm_build_test_command = "npm run build:test"