Skip to content

Commit 8e7fdc0

Browse files
committed
Update links
1 parent b4cdd70 commit 8e7fdc0

File tree

12 files changed

+21
-21
lines changed

12 files changed

+21
-21
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ If you think ShakaCode can help your project, [click here](https://meetings.hubs
4444

4545
## React on Rails Pro
4646

47-
Are you interested in optimizing your Webpack setup for React on Rails, including code splitting with [react-router](https://github.com/ReactTraining/react-router#readme) and [loadable-components](https://loadable-components.com/) with server-side rendering for SEO and hot-reloading for developers?
47+
Are you interested in optimizing 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?
4848
We did this for Popmenu, [lowering Heroku costs 20-25% while getting a 73% decrease in average response times](https://www.shakacode.com/recent-work/popmenu/). Several years later, Popmenu serves tens of millions of SSR requests daily with React on Rails Pro.
4949

5050
If you're interested, read more about [React on Rails Pro](https://www.shakacode.com/react-on-rails-pro/) and [book a call](https://meetings.hubspot.com/justingordon/30-minute-consultation).
@@ -67,7 +67,7 @@ Given that `shakacode/shakapacker` gem already provides basic React integration,
6767
Tight integration with [shakapacker](https://github.com/shakacode/shakapacker) (or its predecessor [rails/webpacker](https://github.com/rails/webpacker)).
6868
1. Server-Side Rendering (SSR), often used for SEO crawler indexing and UX performance.
6969
1. [Automated optimized entry-point creation and bundle inclusion when placing a component on a page. With this feature, you no longer need to configure `javascript_pack_tags` and `stylesheet_pack_tags` on your layouts based on what’s shown. “It just works!”](https://www.shakacode.com/react-on-rails/docs/guides/file-system-based-automated-bundle-generation/)
70-
1. [Redux](https://github.com/reactjs/redux) and [React Router](https://github.com/ReactTraining/react-router#readme) integration with server-side-rendering.
70+
1. [Redux](https://redux.js.org/) and [React Router](https://reactrouter.com/) integration with server-side-rendering.
7171
1. [Internationalization (I18n) and (localization)](https://www.shakacode.com/react-on-rails/docs/guides/i18n)
7272
1. A supportive community. This [web search shows how live public sites are using React on Rails](https://publicwww.com/websites/%22react-on-rails%22++-undeveloped.com+depth%3Aall/).
7373
1. [ReScript Support](https://github.com/shakacode/rescript-react-on-rails-example).

docs/api/view-helpers-api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ Renderer functions are not meant to be used on the server since there's no DOM o
113113
114114
### React Router
115115
116-
[React Router](https://github.com/reactjs/react-router) is supported, including server-side rendering! See:
116+
[React Router](https://reactrouter.com/) is supported, including server-side rendering! See:
117117
118-
1. [React on Rails docs for react-router](https://www.shakacode.com/react-on-rails/docs/javascript/react-router/)
118+
1. [React on Rails docs for React Router](https://www.shakacode.com/react-on-rails/docs/javascript/react-router/)
119119
2. Examples in [spec/dummy/app/views/react_router](https://github.com/shakacode/react_on_rails/tree/master/spec/dummy/app/views/react_router) and follow to the JavaScript code in the [spec/dummy/client/app/startup/ServerRouterApp.jsx](https://github.com/shakacode/react_on_rails/tree/master/spec/dummy/client/app/startup/ServerRouterApp.jsx).
120120
3. [Code Splitting docs](https://www.shakacode.com/react-on-rails/docs/javascript/code-splitting/) for information about how to set up code splitting for server rendered routes.
121121

docs/guides/react-on-rails-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ To provide a high performance framework for integrating Ruby on Rails with React
1515
1. Server-Side Rendering (SSR), often used for SEO crawler indexing and UX performance, is not offered by `shakacode/shakapacker`.
1616
1. Support for HMR for a great developer experience.
1717
1. Supports latest versions of React with hooks.
18-
1. [Redux](https://github.com/reactjs/redux) and [React Router](https://github.com/ReactTraining/react-router#readme) integration including server-side-rendering.
18+
1. [Redux](https://redux.js.org/) and [React Router](https://reactrouter.com/) integration including server-side-rendering.
1919
1. [Internationalization (I18n) and (localization)](https://www.shakacode.com/react-on-rails/docs/guides/i18n/)
2020
1. A supportive community. This [web search shows how live public sites are using React on Rails](https://publicwww.com/websites/%22react-on-rails%22++-undeveloped.com+depth%3Aall/).
2121
1. [ReScript (Reason ML) Support](https://github.com/shakacode/reason-react-on-rails-example).

docs/javascript/code-splitting.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Let's say you're requesting a page that needs to fetch a code chunk from the ser
2020
2121
> (server) `<div data-reactroot="`
2222
23-
Different markup is generated on the client than on the server. Why does this happen? When you register a component or Render-Function with `ReactOnRails.register`, react on rails will render the component as soon as the page loads. However, react-router renders a comment while waiting for the code chunk to be fetched from the server. This means that react will tear all the server rendered code out of the DOM, and then rerender it a moment later once the code chunk arrives from the server, defeating most of the purpose of server rendering.
23+
Different markup is generated on the client than on the server. Why does this happen? When you register a component or Render-Function with `ReactOnRails.register`, React on Rails will render the component as soon as the page loads. However, React Router renders a comment while waiting for the code chunk to be fetched from the server. This means that React will tear all the server rendered code out of the DOM, and then rerender it a moment later once the code chunk arrives from the server, defeating most of the purpose of server rendering.
2424

2525
### The solution
2626

@@ -111,7 +111,7 @@ export default RouterAppRenderer;
111111

112112
What's going on in this example is that we're putting the rendering code in the callback passed to `match`. The effect is that the client render doesn't happen until the code chunk gets fetched from the server, preventing the client/server checksum mismatch.
113113

114-
The idea is that match from react-router is async; it fetches the component using the getComponent method that you provide with the route definition, and then passes the props to the callback that are needed to do the complete render. Then we do the first render inside the callback, so that the first render is the same as the server render.
114+
The idea is that `match` from React Router is async; it fetches the component using the `getComponent` method that you provide with the route definition, and then passes the props needed for the complete render to the callback. Then we do the first render inside the callback, so that the first render is the same as the server render.
115115

116116
The server render matches the deferred render because the server bundle is a single file, and so it doesn't need to wait for anything to be fetched.
117117

docs/javascript/react-router.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ _This article needs updating for the latest version of React Router_
22

33
# Using React Router
44

5-
React on Rails supports the use of React Router. Client-side code doesn't need any special configuration for the React on Rails gem. Implement React Router how you normally would. Note, you might want to avoid using Turbolinks as both Turbolinks and React-Router will be trying to handle the back and forward buttons. If you get this figured out, please do share with the community! Otherwise, you might have to tweak the basic settings for Turbolinks, and this may or may not be worth the effort.
5+
React on Rails supports the use of React Router. Client-side code doesn't need any special configuration for the React on Rails gem. Implement React Router how you normally would. Note, you might want to avoid using Turbolinks as both Turbolinks and React Router will be trying to handle the back and forward buttons. If you get this figured out, please do share with the community! Otherwise, you might have to tweak the basic settings for Turbolinks, and this may or may not be worth the effort.
66

77
If you are working with the HelloWorldApp created by the react_on_rails generator, then the code below corresponds to the module in `client/app/bundles/HelloWorld/startup/HelloWorldApp.jsx`.
88

@@ -24,7 +24,7 @@ const RouterApp = (props, railsContext) => {
2424
};
2525
```
2626

27-
For a fleshed out integration of react_on_rails with react-router, check out [React Webpack Rails Tutorial Code](https://github.com/shakacode/react-webpack-rails-tutorial), specifically the files:
27+
For a fleshed out integration of React on Rails with React Router, check out [React Webpack Rails Tutorial Code](https://github.com/shakacode/react-webpack-rails-tutorial), specifically the files:
2828

2929
- [react-webpack-rails-tutorial/client/app/bundles/comments/routes/routes.jsx](https://github.com/shakacode/react-webpack-rails-tutorial/blob/master/client/app/bundles/comments/routes/routes.jsx)
3030

@@ -39,7 +39,7 @@ Your Render-Function may not return an object with the property `renderedHtml`.
3939

4040
This example **only applies to server-side rendering** and should only be used in the server-side bundle.
4141

42-
From the [original example in the ReactRouter docs](https://github.com/ReactTraining/react-router/blob/v4.3.1/packages/react-router-dom/docs/guides/server-rendering.md)
42+
From the [original example in the React Router docs](https://github.com/ReactTraining/react-router/blob/v4.3.1/packages/react-router-dom/docs/guides/server-rendering.md)
4343

4444
```javascript
4545
import React from 'react';

docs/misc/doctrine.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ Here's the chef's selection from the React on Rails community:
4040

4141
- [Bootstrap](http://getbootstrap.com/), loaded from [bootstrap-loader](https://github.com/shakacode/bootstrap-loader/). Common UI styles.
4242
- [Lodash](https://lodash.com/): Swiss army knife of utilities.
43-
- [React](https://facebook.github.io/react/): UI components.
44-
- [React-Router](https://github.com/reactjs/react-router): Provider of deep links for client-side application.
45-
- [Redux](https://github.com/reactjs/redux): Flux implementation (aka "state container").
43+
- [React](https://react.dev/): UI components.
44+
- [React Router](https://reactrouter.com/): Provider of deep links for client-side application.
45+
- [Redux](https://redux.js.org/): Flux implementation (aka "state container").
4646

4747
### JavaScript Tooling
4848

docs/rails/turbolinks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ This definitely can make an app perform better, even if the JavaScript and style
3030

3131
## Requirements for Using Turbolinks
3232

33-
1. Either **avoid using [React Router](https://github.com/ReactTraining/react-router)** or be prepared to deal with any conflicts between it and Turbolinks.
33+
1. Either **avoid using [React Router](https://reactrouter.com/)** or be prepared to deal with any conflicts between it and Turbolinks.
3434
2. **Use one JS and one CSS file** throughout your app. Otherwise, you will have to figure out how best to handle multiple JS and CSS files throughout the app given Turbolinks.
3535

3636
## Why Not Turbolinks
3737

38-
1. [React Router](https://github.com/ReactTraining/react-router) handles the back and forward buttons, as does Turbolinks. You _might_ be able to make this work. _Please share your findings._
38+
1. [React Router](https://reactrouter.com/) handles the back and forward buttons, as does Turbolinks. You _might_ be able to make this work. _Please share your findings._
3939
1. You want to do code splitting to minimize the JavaScript loaded.
4040

4141
## More Information
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import HelloWorld from './HelloWorld';
22
// This could be specialized for server rendering
3-
// For example, if using React-Router, we'd have the SSR setup here.
3+
// For example, if using React Router, we'd have the SSR setup here.
44

55
export default HelloWorld;

node_package/src/handleError.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function handleRenderFunctionIssue(options: ErrorOptions): string {
99

1010
if (name) {
1111
const lastLine =
12-
'A Render-Function takes a single arg of props (and the location for react-router) ' +
12+
'A Render-Function takes a single arg of props (and the location for React Router) ' +
1313
'and returns a ReactElement.';
1414

1515
let shouldBeRenderFunctionError = `ERROR: ReactOnRails is incorrectly detecting Render-Function to be false. \

spec/dummy/client/app/startup/HelloWorldApp.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ import HelloWorld from './HelloWorld';
99
* Note, this is imported as "HelloWorldApp" by "client-bundle.js"
1010
*
1111
* Note, this is a fictional example, as you'd only use a Render-Function if you wanted to run
12-
* some extra code, such as setting up Redux and React-Router.
12+
* some extra code, such as setting up Redux and React Router.
1313
*/
1414
export default (props) => <HelloWorld {...props} />;

0 commit comments

Comments
 (0)