Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 1.58 KB

upgrading.md

File metadata and controls

33 lines (21 loc) · 1.58 KB

Upgrading

2.7 to 3.0

  • Keep your react_ujs up to date: yarn upgrade
  • Drop support for Webpacker: Before any ReactRails upgrade, make sure upgrading from Webpacker to Shakapacker 7. For more information check out Shakapacker
  • SSR: ReactRails 3.x requires separate compilations for server & client bundles. See Webpack config directory in the dummy app to addapt the new implementation.

2.3 to 2.4

Keep your react_ujs up to date, yarn upgrade

React-Rails 2.4.x uses React 16+ which no longer has React Addons. Therefore the pre-bundled version of react no longer has an addons version, if you need addons still, there is the 2.3.1+ version of the gem that still has addons.

If you need to make changes in your components for the prebundled react, see the migration docs here:

For the vast majority of cases this will get you most of the migration:

  • global find+replace React.Prop -> Prop
  • add import PropTypes from 'prop-types' (Webpacker only)
  • re-run bundle exec rails webpacker:install:react to update npm packages (Webpacker only)