Skip to content

Commit 318a420

Browse files
committed
More updates
1 parent f1d6835 commit 318a420

File tree

7 files changed

+41
-30
lines changed

7 files changed

+41
-30
lines changed

AI_AGENT_INSTRUCTIONS.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ rails new myapp --skip-javascript --database=postgresql
2121
cd myapp
2222

2323
# Use latest version
24-
bundle add react_on_rails --version 16.0.1 --strict
24+
bundle add react_on_rails --strict
2525

2626
bin/rails generate react_on_rails:install
2727

@@ -40,7 +40,7 @@ bin/dev
4040
```bash
4141
cd /path/to/existing/app
4242
# Use latest version
43-
bundle add react_on_rails --version 16.0.1 --strict
43+
bundle add react_on_rails --strict
4444

4545
bin/rails generate react_on_rails:install
4646

@@ -58,6 +58,6 @@ bin/dev
5858

5959
## 🛠️ Common Troubleshooting Commands
6060

61-
- Always run `bin/dev` to test setup, and check browser console for any JavaScript errors.\*
61+
- Always run `bin/dev` to test setup, and check browser console for any JavaScript errors
6262
- `bin/dev kill` stops other conflicting processes
6363
- `bin/rake react_on_rails:doctor` for helpful information

docs/README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ New to React on Rails? Start here for the fastest path to success:
88

99
**[15-Minute Quick Start Guide](./quick-start/README.md)**
1010

11-
Already have Rails + Shakapacker? **[Add React on Rails in 5 minutes](./quick-start/existing-app.md)**
11+
Already have Rails + Shakapacker? **[Add to existing app guide](./guides/installation-into-an-existing-rails-app.md)**
1212

1313
## 📚 Learning Paths
1414

@@ -40,14 +40,14 @@ Jump to what you need
4040

4141
Find guidance for your specific scenario:
4242

43-
| I want to... | Go here |
44-
| ----------------------------------- | ------------------------------------------------------- |
45-
| **Add React to existing Rails app** | [Installation Guide](./guides/installation.md) |
46-
| **Enable server-side rendering** | [SSR Guide](./guides/fundamentals/server-rendering.md) |
47-
| **Set up hot reloading** | [HMR Setup](./guides/development/hot-reloading.md) |
48-
| **Use Redux with Rails** | [Redux Integration](./guides/state-management/redux.md) |
49-
| **Deploy to production** | [Deployment Guide](./guides/deployment/README.md) |
50-
| **Troubleshoot issues** | [Troubleshooting](./troubleshooting/README.md) |
43+
| I want to... | Go here |
44+
| ----------------------------------- | -------------------------------------------------------------------------- |
45+
| **Add React to existing Rails app** | [Installation Guide](./guides/installation-into-an-existing-rails-app.md) |
46+
| **Enable server-side rendering** | [SSR Guide](./guides/react-server-rendering.md) |
47+
| **Set up hot reloading** | [HMR Setup](./guides/hmr-and-hot-reloading-with-the-webpack-dev-server.md) |
48+
| **Use Redux with Rails** | [Redux Integration](./javascript/react-and-redux.md) |
49+
| **Deploy to production** | [Deployment Guide](./guides/deployment.md) |
50+
| **Troubleshoot issues** | [Troubleshooting](./troubleshooting/README.md) |
5151

5252
## 📖 Complete Documentation
5353

@@ -60,21 +60,21 @@ Find guidance for your specific scenario:
6060

6161
### Features
6262

63-
- **[Server-Side Rendering](./guides/fundamentals/server-rendering.md)** - SSR setup and optimization
63+
- **[Server-Side Rendering](./guides/react-server-rendering.md)** - SSR setup and optimization
6464
- **[Auto-Bundling](./guides/auto-bundling-file-system-based-automated-bundle-generation.md)** - Automatic bundle generation
65-
- **[Redux Integration](./guides/state-management/redux.md)** - State management with Redux
66-
- **[React Router](./guides/routing/react-router.md)** - Client-side routing
65+
- **[Redux Integration](./javascript/react-and-redux.md)** - State management with Redux
66+
- **[React Router](./javascript/react-router.md)** - Client-side routing
6767
- **[Internationalization](./guides/i18n.md)** - I18n support
6868

6969
### Development
7070

71-
- **[Hot Module Replacement](./guides/development/hot-reloading.md)** - Fast development workflow
71+
- **[Hot Module Replacement](./guides/hmr-and-hot-reloading-with-the-webpack-dev-server.md)** - Fast development workflow
7272
- **[Testing](./guides/development/testing.md)** - Testing React components
7373
- **[Debugging](./guides/development/debugging.md)** - Common debugging techniques
7474

7575
### Deployment & Performance
7676

77-
- **[Deployment](./guides/deployment/README.md)** - Production deployment guide
77+
- **[Deployment](./guides/deployment.md)** - Production deployment guide
7878
- **[Performance](./guides/performance/README.md)** - Optimization techniques
7979
- **[Bundle Optimization](./guides/performance/webpack-bundle-optimization.md)** - Reduce bundle size
8080

docs/api/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# API Reference
2+
3+
Complete API documentation for React on Rails.
4+
5+
- [View Helpers API](./view-helpers-api.md)
6+
- [Redux Store API](./redux-store-api.md)
7+
- [JavaScript API](./javascript-api.md)

docs/getting-started.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,8 @@ cd PROJECT_NAME
6161

6262
2. Run the install generator:
6363

64-
``bash
64+
```bash
6565
bundle exec rails generate react_on_rails:install
66-
67-
```
68-
6966
```
7067

7168
Start the app:
@@ -137,11 +134,11 @@ With `auto_load_bundle: true`, and by placing your "exposed" components in the a
137134
- Automatically registers it for use.
138135
- Eliminates the need for manual pack configuration.
139136

140-
See [Auto-Bundling: File-System-Based Automated Bundle Generation][./guides/auto-bundling-file-system-based-automated-bundle-generation.md]
137+
See [Auto-Bundling: File-System-Based Automated Bundle Generation](./guides/auto-bundling-file-system-based-automated-bundle-generation.md)
141138

142139
Exposing your component in this way allows you to reference the component from a Rails view. You can expose as many components as you like, but their names must be unique. See below for the details of how you expose your components via the React on Rails Webpack configuration. You may call `ReactOnRails.register` many times.
143140

144-
- `@some_props` can be either a hash or JSON string. This is an optional argument assuming you do not need to pass any options (if you want to pass options, such as `prerender: true`, but you do not want to pass any properties, simply pass an empty hash `{}`). This will make the data available in your component:
141+
- `@some_props` can be either a hash or JSON string. This is an optional argument assuming you do not need to pass any options (if you want to pass options, such as `prerender: true`, but you do not want to pass any properties, simply pass an empty hash `{}`). **Props are automatically sanitized by React on Rails for security.** This will make the data available in your component:
145142

146143
- This is what your HelloWorld.js file might contain. The railsContext is always available for any parameters that you _always_ want available for your React components. It has _nothing_ to do with the concept of the [React Context](https://react.dev/reference/react/useContext). See [Render-Functions and the RailsContext](./guides/render-functions-and-railscontext.md) for more details on this topic.
147144

docs/guides/advanced/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Advanced Features
2+
3+
Advanced React on Rails features and patterns.
4+
5+
- [Auto-Bundling](../auto-bundling-file-system-based-automated-bundle-generation.md)
6+
- [Server-Side Rendering](../react-server-rendering.md)
7+
- [Performance Optimization](../webpack-configuration.md)

docs/guides/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ By the time you read this, the latest may have changed. Be sure to check the ver
2222
- [https://rubygems.org/gems/react_on_rails](https://rubygems.org/gems/react_on_rails)
2323
- [https://www.npmjs.com/package/react-on-rails](https://www.npmjs.com/package/react-on-rails)
2424

25-
# Table of Content
25+
# Table of Contents
2626

2727
- [Installation](#installation)
2828
- [Setting up your environment](#setting-up-your-environment)

docs/quick-start/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Before starting, make sure you have:
1515

1616
> 💡 **Don't have a Rails app?** Run `rails new my_react_app` first.
1717
18-
## 📦 Step 2: Install React on Rails (3 minutes)
18+
## 📦 Step 1: Install React on Rails (3 minutes)
1919

2020
Add the React on Rails gem and run its installer:
2121

@@ -38,7 +38,7 @@ Take a look at the files created by the generator.
3838
- A sample controller and view
3939
- Webpack configuration
4040

41-
## 🎯 Step 3: Start the Development Server (1 minute)
41+
## 🎯 Step 2: Start the Development Server (1 minute)
4242

4343
Start both Rails and the Webpack dev server:
4444

@@ -51,7 +51,7 @@ This starts both:
5151
- Rails server on `http://localhost:3000`
5252
- Webpack dev server for hot reloading
5353

54-
## 🎨 Step 4: See Your Component (2 minutes)
54+
## 🎨 Step 3: See Your Component (2 minutes)
5555

5656
Open your browser and navigate to:
5757

@@ -63,7 +63,7 @@ You should see a page with a React component saying "Hello World"!
6363

6464
🎉 **Congratulations!** You have React running in your Rails app.
6565

66-
## 🔧 Step 5: Edit Your Component (2 minutes)
66+
## 🔧 Step 4: Edit Your Component (2 minutes)
6767

6868
Let's make a quick change to see hot reloading in action:
6969

@@ -72,15 +72,15 @@ Let's make a quick change to see hot reloading in action:
7272
3. Save the file
7373
4. Watch your browser automatically refresh
7474

75-
## 🚀 Step 6: Add Components to Existing Views (5 minutes)
75+
## 🚀 Step 5: Add Components to Existing Views (5 minutes)
7676

7777
Now let's add a React component to one of your existing Rails views:
7878

7979
### Create a New Component
8080

8181
```bash
8282
# Create a new component directory
83-
mkdir -p app/javacript/src/SimpleCounter/components
83+
mkdir -p app/javascript/src/SimpleCounter/ror_components
8484

8585
# Create the component file
8686
touch app/javascript/src/SimpleCounter/ror_components/SimpleCounter.jsx

0 commit comments

Comments
 (0)