Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ Your support keeps this project going.

## NEWS

* We're considering putting in a react-native client into this repo under a mobile folder. We have several open PRs on this.
* Action Cable was recently added in [PR #355](https://github.com/shakacode/react-webpack-rails-tutorial/pull/355).
* We made react-native client: [shakacode/reactrails-react-native-client](https://github.com/shakacode/reactrails-react-native-client/)
* 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 [justin@shakacode.com](mailto:justin@shakacode.com).

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:
Expand Down Expand Up @@ -63,6 +64,7 @@ You can see this tutorial live here: [http://reactrails.com/](http://reactrails.
- Example of using the [react_on_rails gem](https://github.com/shakacode/react_on_rails) for easy react/webpack integration with Rails.
- 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/).
- 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!
- Example of React/Redux with Rails Action Cable.
- Example of Rails 5 with ReactJs/Redux/React-Router with Webpack and ES7.
- 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
- Enabling the use of npm modules and [Babel](https://babeljs.io/) with a Rails application using [Webpack](https://webpack.github.io/).
Expand Down
13 changes: 2 additions & 11 deletions app/views/pages/_header.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<li>
<%= link_to "Can ShakaCode Help You?",
"https://blog.shakacode.com/can-shakacode-help-you-4a5b1e5a8a63#.jex6tg9w9" %>
We're actively seeking new projects with React, React-Native, or Ruby on Rails.
</li>

<li>
Expand All @@ -15,15 +16,6 @@
"https://github.com/shakacode/react-webpack-rails-tutorial/blob/master/README.md" %>
for details of how this example site was built.
</li>
<li>
If this work interests you and you're a developer or designer looking for full or part-time remote work: please
visit <%= link_to "ShakaCode.com", "http://www.shakacode.com" %>,
<%= link_to "click here",
"http://forum.shakacode.com/t/railsonmaui-is-hiring-and-partnering-part-time-remote-is-ok/156/3" %>
and
<%= link_to "here",
"http://forum.shakacode.com/t/railsonmaui-is-hiring-and-partnering-part-time-remote-is-ok/156/2" %>.
</li>
<li>
Read <%= link_to "Documentation for React on Rails",
"https://shakacode.gitbooks.io/react-on-rails/content/" %> and
Expand All @@ -41,8 +33,7 @@
</li>
<li>
<%= link_to "ShakaCode", "http://www.shakacode.com"%>
is doing Skype plus Slack/Github based coaching for
<%= link_to "React on Rails", "https://github.com/shakacode/react_on_rails" %>.
is doing Skype plus Slack/Github based coaching for React on Rails.
<b><%= link_to "Click here", "http://www.shakacode.com/work/index.html" %></b> for more information.
</li>
</ul>
Expand Down
21 changes: 17 additions & 4 deletions client/app/bundles/comments/components/CommentBox/CommentBox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,25 @@ export default class CommentBox extends BaseComponent {
<h2>
Comments {data.get('isFetching') && 'Loading...'}
</h2>
<a href="javascript:void(0)" onClick={this.refreshComments}>Refresh</a>
<p>
<ul>
<li>
{data.get('isFetching') && <br/> ||
<a href="javascript:void(0)" onClick={this.refreshComments}>Force Refresh of All Comments</a>
}
</li>
<li>
<b>Text</b> supports Github Flavored Markdown.
Comments older than 24 hours are deleted.<br />
</li>
<li>
Comments older than 24 hours are deleted.
</li>
<li>
<b>Name</b> is preserved. <b>Text</b> is reset, between submits.
</p>
</li>
<li>
To see Action Cable instantly update two browsers, open two browsers and submit a comment!
</li>
</ul>
<CommentForm
isSaving={data.get('isSaving')}
error={data.get('submitCommentError')}
Expand Down