You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**`RSCRoute` component**: Seamless server-side rendering with automatic payload injection and hydration [PR 1696](https://github.com/shakacode/react_on_rails/pull/1696) by [AbanoubGhadban](https://github.com/AbanoubGhadban)
37
38
-**Optimized RSC payload injection**: Now injected after component HTML markup for better performance [PR 1738](https://github.com/shakacode/react_on_rails/pull/1738) by [AbanoubGhadban](https://github.com/AbanoubGhadban)
38
39
-**Communication protocol v2.0.0**: Supports uploading multiple bundles at once for improved efficiency
39
40
40
41
**⚡ Performance & Loading Strategy**
42
+
41
43
-**New `generated_component_packs_loading_strategy`**: Choose from `sync`, `async`, or `defer` strategies [PR 1712](https://github.com/shakacode/react_on_rails/pull/1712) by [AbanoubGhadban](https://github.com/AbanoubGhadban)
42
44
-**Async render function support**: Components can now return from async render functions [PR 1720](https://github.com/shakacode/react_on_rails/pull/1720) by [AbanoubGhadban](https://github.com/AbanoubGhadban)
43
45
-**Optimized client imports**: Generated packs now import from `react-on-rails/client` for better tree-shaking [PR 1706](https://github.com/shakacode/react_on_rails/pull/1706) by [alexeyr-ci](https://github.com/alexeyr-ci)
@@ -50,10 +52,10 @@ See [Release Notes](docs/release-notes/16.0.0.md) for complete migration guide.
50
52
-**ReactRefreshWebpackPlugin v0.6.0 support**: Added conditional logic for proper configuration [PR 1748](https://github.com/shakacode/react_on_rails/pull/1748) by [judahmeek](https://github.com/judahmeek)
51
53
-**Version validation improvements**: Fixed invalid warnings with pre-release versions [PR 1742](https://github.com/shakacode/react_on_rails/pull/1742) by [alexeyr-ci2](https://github.com/alexeyr-ci2)
52
54
53
-
54
55
#### Breaking Changes
55
56
56
57
**🔧 Webpacker Support Removed**
58
+
57
59
-**Complete removal of Webpacker support**. Shakapacker >= 6.0 is now required.
58
60
- Migration:
59
61
- Remove `webpacker` gem from your Gemfile
@@ -63,15 +65,18 @@ See [Release Notes](docs/release-notes/16.0.0.md) for complete migration guide.
Copy file name to clipboardExpand all lines: README.md
+22-4Lines changed: 22 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,17 +47,35 @@ We also specialize in helping development teams lower infrastructure and CI cost
47
47
48
48
If you think ShakaCode can help your project, [click here](https://meetings.hubspot.com/justingordon/30-minute-consultation) to book a call with [Justin Gordon](mailto:[email protected]), the creator of React on Rails.
49
49
50
+
## Upgrading React on Rails
51
+
52
+
After upgrading to a new major version, run the generator to get latest defaults:
53
+
54
+
```bash
55
+
rails generate react_on_rails:install
56
+
```
57
+
58
+
**Important**: Review changes carefully before applying to avoid overwriting custom configurations. The generator updates:
59
+
60
+
-`bin/dev` (improved development workflow)
61
+
- webpack configurations
62
+
-`shakapacker.yml` settings
63
+
- other configuration files
64
+
65
+
For detailed upgrade instructions, see [upgrade guide documentation](docs/guides/upgrading-react-on-rails.md).
66
+
50
67
## React on Rails Pro
51
68
52
69
Some features of React on Rails regarding performance require a React on Rails Pro subscription.
53
70
54
71
Note: the subscription price is free for evaluation and non-production use.
55
72
56
73
Notable new features include:
57
-
* React Server Components
58
-
* Streaming SSR
59
-
* Loadable Components
60
-
* Code Splitting with React Router
74
+
75
+
- React Server Components
76
+
- Streaming SSR
77
+
- Loadable Components
78
+
- Code Splitting with React Router
61
79
62
80
React on Rails Pro is the best way to optimize your Webpack setup for React on Rails, including code splitting with [React Router](https://reactrouter.com/) and [loadable-components](https://loadable-components.com/) with server-side rendering for SEO and hot-reloading for developers.
Copy file name to clipboardExpand all lines: docs/guides/upgrading-react-on-rails.md
+81Lines changed: 81 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,87 @@ If you would like help in migrating between React on Rails versions or help with
6
6
7
7
We specialize in helping companies to quickly and efficiently upgrade. The older versions use the Rails asset pipeline to package client assets. The current and recommended way is to use Webpack 4+ for asset preparation. You may also need help migrating from the `rails/webpacker`'s Webpack configuration to a better setup ready for Server Side Rendering.
8
8
9
+
## General Upgrade Process
10
+
11
+
After upgrading to any major version, always run the generator to get the latest defaults:
12
+
13
+
```bash
14
+
rails generate react_on_rails:install
15
+
```
16
+
17
+
**⚠️ Important**: Review generated changes carefully before applying to avoid overwriting custom configurations. The generator updates:
18
+
19
+
-`bin/dev` (improved development workflow)
20
+
- webpack configurations
21
+
-`shakapacker.yml` settings
22
+
- other configuration files
23
+
24
+
## Upgrading to v16
25
+
26
+
### Breaking Changes
27
+
28
+
-**Webpacker support completely removed**. Shakapacker >= 6.0 is now required.
29
+
-**Updated runtime requirements**:
30
+
- Minimum Ruby version: 3.2
31
+
- Minimum Node.js version: 20
32
+
-**Install generator now validates prerequisites** and requires at least one JavaScript package manager
33
+
34
+
### Migration Steps
35
+
36
+
1.**Update Dependencies**
37
+
38
+
```ruby
39
+
# Gemfile
40
+
gem "react_on_rails", "~> 16.0"
41
+
```
42
+
43
+
```json
44
+
// package.json
45
+
{
46
+
"dependencies": {
47
+
"react-on-rails": "^16.0.0"
48
+
}
49
+
}
50
+
```
51
+
52
+
2.**Install Updates**
53
+
54
+
```bash
55
+
bundle update react_on_rails
56
+
npm install
57
+
```
58
+
59
+
3.**Run Generator**
60
+
61
+
```bash
62
+
rails generate react_on_rails:install
63
+
```
64
+
65
+
4.**Review and Apply Changes**
66
+
67
+
- Check webpack configuration exports (function naming may have changed)
68
+
- Review `shakapacker.yml` settings
69
+
- Update `bin/dev` if needed
70
+
71
+
5.**Test Your Application**
72
+
73
+
```bash
74
+
# Test asset compilation
75
+
bundle exec rails assets:precompile
76
+
77
+
# Test development server
78
+
bin/dev
79
+
80
+
# Run your test suite
81
+
bundle exec rspec # or your test command
82
+
```
83
+
84
+
### Enhanced Features in v16
85
+
86
+
-**Enhanced error handling** in `react_on_rails:generate_packs` task with detailed debugging guidance
87
+
-**Improved development tooling** with better error messages and troubleshooting steps
88
+
-**Better package manager detection** with multi-strategy validation
0 commit comments