react_on_rails 7.0.0 → 7.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -1
- data/NEWS.md +8 -0
- data/README.md +6 -8
- data/app/helpers/react_on_rails_helper.rb +1 -0
- data/lib/react_on_rails/version.rb +1 -1
- data/package.json +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 498745275ca8cd46d335c7aef19dcb618c47eb49
|
4
|
+
data.tar.gz: 492e8aacccc4516bf853944f863cd15ce31836e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d9f00bde8ef88dfe30a91749f1e3af77245c9f642bfbee850bf8856bd2f06dddd2c03f4cb93e318b126366047393d962811780ac7d40e1442de6865f50af3c6
|
7
|
+
data.tar.gz: 5d04f41eca99a0ace5fb86abeb0f87ee126be25150ebc73fc109add34dde5a9da00273aa83eb077da320f828fd3862694a71449813b117c8a099aacefbc78891
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,12 @@ All notable changes to this project's source code will be documented in this fil
|
|
4
4
|
Contributors: please follow the recommendations outlined at [keepachangelog.com](http://keepachangelog.com/). Please use the existing headings and styling as a guide, and add a link for the version diff at the bottom of the file. Also, please update the `Unreleased` link to compare to the latest release version.
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
|
+
*Please add entries here for your pull requests.*
|
8
|
+
|
9
|
+
## [7.0.1] - 2017-04-27
|
10
|
+
### Fixed
|
11
|
+
- Fix to handle nil values in json_safe_and_pretty [#823](https://github.com/shakacode/react_on_rails/pull/823) by [dzirtusss](https://github.com/dzirtusss)
|
12
|
+
|
7
13
|
## [7.0.0] - 2017-04-25
|
8
14
|
### Changed
|
9
15
|
- Any version differences in gem and node package for React on Rails throw an error [#821](https://github.com/shakacode/react_on_rails/pull/821) by [justin808](https://github.com/justin808)
|
@@ -541,7 +547,8 @@ Best done with Object destructing:
|
|
541
547
|
##### Fixed
|
542
548
|
- Fix several generator related issues.
|
543
549
|
|
544
|
-
[Unreleased]: https://github.com/shakacode/react_on_rails/compare/7.0.
|
550
|
+
[Unreleased]: https://github.com/shakacode/react_on_rails/compare/7.0.1...master
|
551
|
+
[7.0.1]: https://github.com/shakacode/react_on_rails/compare/7.0.0...7.0.1
|
545
552
|
[7.0.0]: https://github.com/shakacode/react_on_rails/compare/6.10.1...7.0.0
|
546
553
|
[6.10.1]: https://github.com/shakacode/react_on_rails/compare/6.10.0...6.10.1
|
547
554
|
[6.10.0]: https://github.com/shakacode/react_on_rails/compare/6.9.3...6.10.0
|
data/NEWS.md
CHANGED
@@ -3,6 +3,14 @@
|
|
3
3
|
*We'll keep a history of the news. A few bullets at the top will also show on the [README.md](./README.md).*
|
4
4
|
|
5
5
|
* Always see the [CHANGELOG.md](./CHANGELOG.md) for the latest project changes.
|
6
|
+
* 2017-04-25: 7.0.0 Shipped! Performance improvements! Please upgrade! Only "breaking" change is that you have to update both the node module and the Ruby gem.
|
7
|
+
* 2017-04-09: 8.0.0 beta work to include webpacker_lite gem has begun. See [#786](https://github.com/shakacode/react_on_rails/issues/786).
|
8
|
+
* 2017-04-03: 6.9.3 Released! Props rendered in JSON script tag. Page size is smaller now due to less escaping!
|
9
|
+
* 2017-03-06: Updated to Webpack v2!
|
10
|
+
* 2017-03-02: Demo of internationalization (i18n) is live at [reactrails.com](https://www.reactrails.com/). Docs [here](docs/basics/i18n.md).
|
11
|
+
* 2017-02-28: See [discussions here on Webpacker](https://github.com/rails/webpacker/issues/139) regarding how Webpacker will allow React on Rails to avoid using the asset pipeline in the near future.
|
12
|
+
* 2017-02-28: Upgrade to Webpack v2 or use the `--bail` option in your webpack script for test and production builds. See the discussion on [PR #730](https://github.com/shakacode/react_on_rails/pull/730).
|
13
|
+
* 2016-11-03: Spoke at [LA Ruby: "React on Rails: Why, What, and How?"](http://www.meetup.com/laruby/events/234825187/). [Video and pictures in this article](https://blog.shakacode.com/my-react-on-rails-talk-at-the-la-ruby-rails-meetup-november-10-2016-eaaa83aff800#.ej6h4eglp).
|
6
14
|
* 2016-12-20: New Video on Egghead.io: [Creating a component with React on Rails](https://egghead.io/lessons/react-creating-a-component-with-react-on-rails)
|
7
15
|
* 2016-11-03: Spoke at [LA Ruby, 7pm, Thursday, November 10 in Venice, CA: "React on Rails: Why, What, and How?"](http://www.meetup.com/laruby/events/234825187/). [Video and pictures in this article](https://blog.shakacode.com/my-react-on-rails-talk-at-the-la-ruby-rails-meetup-november-10-2016-eaaa83aff800#.ej6h4eglp).
|
8
16
|
* 2016-08-27: We now have a [Documentation Gitbook](https://shakacode.gitbooks.io/react-on-rails/content/) for improved readability & reference.
|
data/README.md
CHANGED
@@ -49,13 +49,8 @@ For more testimonials, see [Live Projects](PROJECTS.md) and [Kudos](./KUDOS.md).
|
|
49
49
|
* [284 Ruby Rogues: React on Rails with Justin Gordon and Rob Wise](https://devchat.tv/ruby-rogues/284-rr-react-on-rails-with-justin-gordon-and-rob-wise)
|
50
50
|
|
51
51
|
# NEWS
|
52
|
-
* 2017-04-
|
53
|
-
* 2017-04-
|
54
|
-
* 2017-03-06: Updated to Webpack v2!
|
55
|
-
* 2017-03-02: Demo of internationalization (i18n) is live at [reactrails.com](https://www.reactrails.com/). Docs [here](docs/basics/i18n.md).
|
56
|
-
* 2017-02-28: See [discussions here on Webpacker](https://github.com/rails/webpacker/issues/139) regarding how Webpacker will allow React on Rails to avoid using the asset pipeline in the near future.
|
57
|
-
* 2017-02-28: Upgrade to Webpack v2 or use the `--bail` option in your webpack script for test and production builds. See the discussion on [PR #730](https://github.com/shakacode/react_on_rails/pull/730).
|
58
|
-
* 2016-11-03: Spoke at [LA Ruby: "React on Rails: Why, What, and How?"](http://www.meetup.com/laruby/events/234825187/). [Video and pictures in this article](https://blog.shakacode.com/my-react-on-rails-talk-at-the-la-ruby-rails-meetup-november-10-2016-eaaa83aff800#.ej6h4eglp).
|
52
|
+
* 2017-04-25: 7.0.0 Shipped! Performance improvements! Please upgrade! Only "breaking" change is that you have to update both the node module and the Ruby gem.
|
53
|
+
* 2017-04-09: 8.0.0 beta work to include webpacker_lite gem has begun. See [#786](https://github.com/shakacode/react_on_rails/issues/786).
|
59
54
|
* *See [NEWS.md](NEWS.md) for more notes over time.*
|
60
55
|
|
61
56
|
# React on Rails
|
@@ -227,7 +222,10 @@ In the following screenshot you can see the 3 parts of React on Rails rendering:
|
|
227
222
|
2. The wrapper div `<div id="HelloWorld-react-component-0">` specifies the div where to place the React rendering. It encloses the server-rendered HTML for the React component
|
228
223
|
3. Additional JavaScript is placed to console log any messages, such as server rendering errors. Note, these server side logs can be configured to only be sent to the server logs.
|
229
224
|
|
230
|
-
**Note**:
|
225
|
+
**Note**:
|
226
|
+
|
227
|
+
* If server rendering is not used (prerender: false), then the major difference is that the HTML rendered for the React component only contains the outer div: `<div id="HelloWorld-react-component-0"/>`. The first specification of the React component is just the same.
|
228
|
+
* The below image is not yet updated for version 7.0.0 which uses a `<script>` tag for the props. Instead of a hidden div, we have the props inside of the a `<script>` tag.
|
231
229
|
|
232
230
|
![Comparison of a normal React Component with its server-rendered version](https://cloud.githubusercontent.com/assets/1118459/12607542/a959d5c8-c48a-11e5-8187-2433d543ccaa.png)
|
233
231
|
|
@@ -231,6 +231,7 @@ module ReactOnRailsHelper
|
|
231
231
|
end
|
232
232
|
|
233
233
|
def json_safe_and_pretty(hash_or_string)
|
234
|
+
return if hash_or_string.nil?
|
234
235
|
unless hash_or_string.class.in?([Hash, String])
|
235
236
|
raise "#{__method__} only accepts String or Hash as argument "\
|
236
237
|
"(#{hash_or_string.class} given)."
|
data/package.json
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: react_on_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.0.
|
4
|
+
version: 7.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Gordon
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: connection_pool
|