Skip to content

Commit 8607659

Browse files
committed
Fix documentation issues identified in PR review
Addresses valid issues from Claude's PR review: 1. Fixed JavaScript syntax error in using-react-on-rails.md:192 - Changed semicolon to comma in object destructuring example - Was accidentally introduced during linting commit 2. Clarified Rails version requirements in tutorial.md - Changed "We support Rails 6 and later" to "This tutorial targets Rails 7.0+" - Explicitly noted Rails 6 is supported but tutorial uses Rails 7 - Removed version confusion between prerequisites and tutorial steps 3. Fixed markdownlint issues - Added language hint to code fence in using-react-on-rails.md (text) - Added language hint to Procfile code fence in heroku-deployment.md (procfile) These changes ensure code examples are syntactically correct and version requirements are clear for users following the tutorial.
1 parent 2bf6d06 commit 8607659

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

docs/deployment/heroku-deployment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Next, configure your app for Puma, per the [instructions on Heroku](https://devc
9797

9898
Create `./Procfile` with the following content. This is what Heroku uses to start your app.
9999

100-
```
100+
```procfile
101101
web: bundle exec puma -C config/puma.rb
102102
```
103103

docs/getting-started/tutorial.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ By the time you read this, the latest may have changed. Be sure to check the ver
4949
Trying out **React on Rails** is super easy, so long as you have the basic prerequisites.
5050

5151
- **Ruby:** We support all active Ruby versions but recommend using the latest stable Ruby version. Solutions like [rvm](https://rvm.io) or [rbenv](https://github.com/rbenv/rbenv) make it easy to have multiple Ruby versions on your machine.
52-
- **Rails:** We support Rails 6 and later.
52+
- **Rails:** This tutorial targets Rails 7.0+. React on Rails supports Rails 6 and later, but some tutorial steps may differ for Rails 6.
5353
- **Nodejs:** We support all [active Node versions](https://github.com/nodejs/release#release-schedule) but recommend using the latest LTS release of Nodejs for the longest support. Older inactive node versions might still work but is not guaranteed. We also recommend using [nvm](https://github.com/nvm-sh/nvm/) to ease using different node versions in different projects.
5454
- **yarn:** We use [yarn classic](https://classic.yarnpkg.com/) as our node package manager.
5555
- You need to have either [Overmind](https://github.com/DarthSim/overmind) or [Foreman](https://rubygems.org/gems/foreman) as a process manager.
@@ -58,7 +58,7 @@ Trying out **React on Rails** is super easy, so long as you have the basic prere
5858

5959
Then we need to create a fresh Rails application as follows.
6060

61-
First, be sure to run `rails -v` and check you are using Rails 7.0 or above.
61+
First, be sure to run `rails -v` and check you are using Rails 7.0 or above for this tutorial.
6262

6363
```bash
6464
# For Rails 6.x

docs/getting-started/using-react-on-rails.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ After running `rails generate react_on_rails:install`, you'll see:
123123

124124
### Component Structure
125125

126-
```
126+
```text
127127
app/javascript/
128128
└── bundles/HelloWorld/ # or src/HelloWorld/ror_components/ with auto-bundling
129129
└── HelloWorld.jsx
@@ -187,11 +187,13 @@ export default MyApp;
187187
For advanced server rendering (like React Router), you can return an object:
188188

189189
```js
190-
{
190+
({
191191
renderedHtml: {
192-
componentHtml, redirectLocation, error;
193-
}
194-
}
192+
componentHtml,
193+
redirectLocation,
194+
error,
195+
},
196+
});
195197
```
196198

197199
Use with `react_component_hash` helper for multiple HTML strings (useful with React Helmet for meta tags).

0 commit comments

Comments
 (0)