Skip to content

Commit e7228d2

Browse files
authored
Update docs (shakacode#356)
1 parent 6be99d6 commit e7228d2

File tree

3 files changed

+22
-16
lines changed

3 files changed

+22
-16
lines changed

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ Your support keeps this project going.
1919

2020
## NEWS
2121

22-
* We're considering putting in a react-native client into this repo under a mobile folder. We have several open PRs on this.
22+
* Action Cable was recently added in [PR #355](https://github.com/shakacode/react-webpack-rails-tutorial/pull/355).
23+
* We made react-native client: [shakacode/reactrails-react-native-client](https://github.com/shakacode/reactrails-react-native-client/)
2324
* We have [some other open PRs](https://github.com/shakacode/react-webpack-rails-tutorial/pulls) of things we may soon be incorporating, including localization and action cable! Stay tuned! If you have opinions of what should or should not get merged, get in touch with [[email protected]](mailto:[email protected]).
2425

2526
This tutorial app demonstrates advanced functionality beyond what's provided by the React on Rails generators, mostly in the area of Webpack and React usage. Due to the architecture of placing all client side assets in the `/client` directory, React on Rails supports just about anything that Webpack and JavaScript can do, such as:
@@ -63,6 +64,7 @@ You can see this tutorial live here: [http://reactrails.com/](http://reactrails.
6364
- Example of using the [react_on_rails gem](https://github.com/shakacode/react_on_rails) for easy react/webpack integration with Rails.
6465
- Example of React with [CSS Modules](http://glenmaddern.com/articles/css-modules) inside of Rails using Webpack as described in [Smarter CSS builds with Webpack](http://bensmithett.com/smarter-css-builds-with-webpack/).
6566
- Example of enabling hot reloading of both JS and CSS (modules) from your Rails app in development mode. Change your code. Save. Browser updates without a refresh!
67+
- Example of React/Redux with Rails Action Cable.
6668
- Example of Rails 5 with ReactJs/Redux/React-Router with Webpack and ES7.
6769
- Enabling development of a JS client independently from Rails using the [Webpack Dev Server](https://webpack.github.io/docs/webpack-dev-server.html). You can see this by starting the app and visiting http://localhost:4000
6870
- Enabling the use of npm modules and [Babel](https://babeljs.io/) with a Rails application using [Webpack](https://webpack.github.io/).

app/views/pages/_header.html.erb

+2-11
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<li>
88
<%= link_to "Can ShakaCode Help You?",
99
"https://blog.shakacode.com/can-shakacode-help-you-4a5b1e5a8a63#.jex6tg9w9" %>
10+
We're actively seeking new projects with React, React-Native, or Ruby on Rails.
1011
</li>
1112

1213
<li>
@@ -15,15 +16,6 @@
1516
"https://github.com/shakacode/react-webpack-rails-tutorial/blob/master/README.md" %>
1617
for details of how this example site was built.
1718
</li>
18-
<li>
19-
If this work interests you and you're a developer or designer looking for full or part-time remote work: please
20-
visit <%= link_to "ShakaCode.com", "http://www.shakacode.com" %>,
21-
<%= link_to "click here",
22-
"http://forum.shakacode.com/t/railsonmaui-is-hiring-and-partnering-part-time-remote-is-ok/156/3" %>
23-
and
24-
<%= link_to "here",
25-
"http://forum.shakacode.com/t/railsonmaui-is-hiring-and-partnering-part-time-remote-is-ok/156/2" %>.
26-
</li>
2719
<li>
2820
Read <%= link_to "Documentation for React on Rails",
2921
"https://shakacode.gitbooks.io/react-on-rails/content/" %> and
@@ -41,8 +33,7 @@
4133
</li>
4234
<li>
4335
<%= link_to "ShakaCode", "http://www.shakacode.com"%>
44-
is doing Skype plus Slack/Github based coaching for
45-
<%= link_to "React on Rails", "https://github.com/shakacode/react_on_rails" %>.
36+
is doing Skype plus Slack/Github based coaching for React on Rails.
4637
<b><%= link_to "Click here", "http://www.shakacode.com/work/index.html" %></b> for more information.
4738
</li>
4839
</ul>

client/app/bundles/comments/components/CommentBox/CommentBox.jsx

+17-4
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,25 @@ export default class CommentBox extends BaseComponent {
7474
<h2>
7575
Comments {data.get('isFetching') && 'Loading...'}
7676
</h2>
77-
<a href="javascript:void(0)" onClick={this.refreshComments}>Refresh</a>
78-
<p>
77+
<ul>
78+
<li>
79+
{data.get('isFetching') && <br/> ||
80+
<a href="javascript:void(0)" onClick={this.refreshComments}>Force Refresh of All Comments</a>
81+
}
82+
</li>
83+
<li>
7984
<b>Text</b> supports Github Flavored Markdown.
80-
Comments older than 24 hours are deleted.<br />
85+
</li>
86+
<li>
87+
Comments older than 24 hours are deleted.
88+
</li>
89+
<li>
8190
<b>Name</b> is preserved. <b>Text</b> is reset, between submits.
82-
</p>
91+
</li>
92+
<li>
93+
To see Action Cable instantly update two browsers, open two browsers and submit a comment!
94+
</li>
95+
</ul>
8396
<CommentForm
8497
isSaving={data.get('isSaving')}
8598
error={data.get('submitCommentError')}

0 commit comments

Comments
 (0)