New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-on-rails

Package Overview
Dependencies
Maintainers
1
Versions
207
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-on-rails - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

6

CHANGELOG.md

@@ -7,3 +7,9 @@ # Change Log

## [Unreleased]
##### Fixed
- Fixed regression where apps that were not using Turbolinks would not render components on page load.
##### Added
- `debug_turbolinks` helper for debugging turbolinks issues. See [turbolinks](docs/additional_reading/turbolinks.md).
- Enhanced regression testing for non-turbolinks apps. Runs all tests for dummy app with turbolinks both disabled and enabled.
## [2.1.0] - 2016-01-26

@@ -10,0 +16,0 @@ ##### Added

2

node_package/lib/clientStartup.js

@@ -141,3 +141,3 @@ 'use strict';

debugTurbolinks('WITHOUT TURBOLINKS: DOMContentLoaded handler installed.');
document.addEventListener('DOMContentLoaded', reactOnRailsPageLoaded);
reactOnRailsPageLoaded();
} else {

@@ -144,0 +144,0 @@ debugTurbolinks('WITH TURBOLINKS: document page:before-unload and page:change handlers' + ' installed.');

@@ -64,6 +64,7 @@ 'use strict';

* @param domNodeId
* @returns {virtualDomElement} Reference to your component's backing instance
*/
render: function render(name, props, domNodeId) {
var reactElement = (0, _createReactElement2.default)({ name: name, props: props, domNodeId: domNodeId });
_reactDom2.default.render(reactElement, document.getElementById(domNodeId));
return _reactDom2.default.render(reactElement, document.getElementById(domNodeId));
},

@@ -70,0 +71,0 @@

{
"name": "react-on-rails",
"version": "2.1.0",
"version": "2.1.1",
"description": "react-on-rails JavaScript for react_on_rails Ruby gem",

@@ -37,3 +37,4 @@ "main": "node_package/lib/ReactOnRails.js",

"tape": "^4.4.0",
"webpack": "^1.12.12"
"webpack": "^1.12.12",
"jsdom": "^8.0.0-0"
},

@@ -40,0 +41,0 @@ "peerDependencies": {

@@ -5,4 +5,9 @@ [![Build Status](https://travis-ci.org/shakacode/react_on_rails.svg?branch=master)](https://travis-ci.org/shakacode/react_on_rails) [![Coverage Status](https://coveralls.io/repos/shakacode/react_on_rails/badge.svg?branch=master&service=github)](https://coveralls.io/github/shakacode/react_on_rails?branch=master) [![Dependency Status](https://gemnasium.com/shakacode/react_on_rails.svg)](https://gemnasium.com/shakacode/react_on_rails) [![Gem Version](https://badge.fury.io/rb/react_on_rails.svg)](https://badge.fury.io/rb/react_on_rails) [![npm version](https://badge.fury.io/js/react-on-rails.svg)](https://badge.fury.io/js/react-on-rails)

* 2.1 is almost ready and will probably ship on Monday, 1/25/2016. Please grab the latest and let us know if you see any issues! [Migration steps from 1.x](https://github.com/shakacode/react_on_rails/blob/master/CHANGELOG.md#migration-steps).
* 2.1 has shipped on Tuesday, 2/26/2016. Please see the [Changelog](CHANGELOG.md) for details, and let us know if you see any issues! [Migration steps from 1.x](https://github.com/shakacode/react_on_rails/blob/master/CHANGELOG.md#migration-steps).
* Highlights:
1. Fixed a **critical** problem with TurboLinks.
2. Provides a convenient helper to ensure that JavaScript assets are compiled before running tests.
* React on Rails does not yet have *generator* support for building new apps that use CSS modules and hot reloading via the Rails server as is demonstrated in the [shakacode/react-webpack-rails-tutorial](https://github.com/shakacode/react-webpack-rails-tutorial/). *We do support this, but we don't generate the code.* If you did generate a fresh app from react_on_rails and want to move to CSS Modules, then see [PR 175: Babel 6 / CSS Modules / Rails hot reloading](https://github.com/shakacode/react-webpack-rails-tutorial/pull/175). Note, while there are probably fixes after this PR was accepted, this has the majority of the changes. See [the tutorial](https://github.com/shakacode/react-webpack-rails-tutorial/#news) for more information. Ping us if you want to help!
* [ShakaCode](http://www.shakacode.com) is doing Skype plus Slack/Github based coaching for "React on Rails". [Click here](http://www.shakacode.com/work/index.html) for more information.
* Be sure to read our new article [The React on Rails Doctrine](http://www.shakacode.com/2016/01/26/the-react-on-rails-doctrine.html).

@@ -17,3 +22,3 @@ # React on Rails

* [The React on Rails Doctrine](docs/doctrine.md)
* [The React on Rails Doctrine](http://www.shakacode.com/2016/01/26/the-react-on-rails-doctrine.html)
* [React Webpack Rails Tutorial Code](https://github.com/shakacode/react-webpack-rails-tutorial) along with the live example at [www.reactrails.com](http://www.reactrails.com).

@@ -171,11 +176,11 @@

In the following screenshot you can see the 3 parts of react_on_rails rendering:
In the following screenshot you can see the 3 parts of React on Rails rendering:
1. Inline JavaScript to "client-side" render the React component.
2. The wrapper div `<div id="HelloWorld-react-component-0">` enclosing the server-rendered HTML for the React component
3. Additional JavaScript to console log any messages, such as server rendering errors.
1. A hidden HTML div that contains the properties of the React component, such as the registered name and any props. A JavaScript function runs after the page loads to convert take this data and build initialize React components.
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
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.
**Note**: If server rendering is not used (prerender: false), then the major difference is that the HTML rendered contains *only* the outer div: `<div id="HelloWorld-react-component-0"/>`
**Note**: 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.
![Comparison of a normal React Component with its server-rendered version](https://cloud.githubusercontent.com/assets/1118459/10157268/41435186-6624-11e5-9341-6fc4cf35ee90.png)
![Comparison of a normal React Component with its server-rendered version](https://cloud.githubusercontent.com/assets/1118459/12607542/a959d5c8-c48a-11e5-8187-2433d543ccaa.png)

@@ -365,3 +370,3 @@ ### Building the Bundles

- Remove the generated generated lines for react-rails in your application.js file.
- Remove the generated generated lines for react-rails in your application.js file.

@@ -379,2 +384,3 @@ ```

## Additional Reading
+ [The React on Rails Doctrine](http://www.shakacode.com/2016/01/26/the-react-on-rails-doctrine.html)
+ [Generated Client Code](docs/additional_reading/generated_client_code.md)

@@ -388,2 +394,3 @@ + [Heroku Deployment](docs/additional_reading/heroku_deployment.md)

+ [Server Rendering Tips](docs/additional_reading/server_rendering_tips.md)
+ [Rails View Rendering from Inline JavaScript](docs/additional_reading/rails_view_rendering_from_inline_javascript.md)
+ [Tips](docs/additional_reading/tips.md)

@@ -394,5 +401,6 @@ + [Tutorial for v2.0](docs/tutorial-v2.md), deployed [here](https://shakacode-react-on-rails.herokuapp.com/).

+ [Webpack Cookbook](https://christianalfoni.github.io/react-webpack-cookbook/index.html)
+ [Changelog](CHANGELOG.md)
## Demos
+ [www.reactrails.com](http://www.reactrails.com)
+ [www.reactrails.com](http://www.reactrails.com) with source at [shakacode/react-webpack-rails-tutorial](https://github.com/shakacode/react-webpack-rails-tutorial/).
+ [spec app](spec/dummy): Great simple examples used for our tests.

@@ -416,3 +424,3 @@ ```

The project started with [Justin Gordon](https://github.com/justin808/) pairing with [Samnang Chhun](https://github.com/samnang) to figure out how to do server rendering with Webpack plus Rails. [Alex Fedoseev](https://github.com/alexfedoseev) then joined in. [Rob Wise](https://github.com/robwise), [Aaron Van Bokhoven](https://github.com/aaronvb), and [Andy Wang](https://github.com/yorzi) did the bulk of the generators.
The project started with [Justin Gordon](https://github.com/justin808/) pairing with [Samnang Chhun](https://github.com/samnang) to figure out how to do server rendering with Webpack plus Rails. [Alex Fedoseev](https://github.com/alexfedoseev) then joined in. [Rob Wise](https://github.com/robwise), [Aaron Van Bokhoven](https://github.com/aaronvb), and [Andy Wang](https://github.com/yorzi) did the bulk of the generators. Many others have [contributed](https://github.com/shakacode/react_on_rails/graphs/contributors).

@@ -419,0 +427,0 @@ We owe much gratitude to the work of the [react-rails gem](https://github.com/reactjs/react-rails). We've also been inspired by the [react_webpack_rails gem](https://github.com/netguru/react_webpack_rails).

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc