Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-on-rails

Package Overview
Dependencies
Maintainers
1
Versions
204
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.0.0-rc.1 to 2.0.0-rc.3

46

CHANGELOG.md
# Change Log
All notable changes to this project will be documented in this file. Items under `Unreleased` is upcoming features that will be out in next version.
## v2.0.0
- Move JavaScript part of react_on_rails to npm package 'react-on-rails'.
- Converted JavaScript code to ES6! with tests!
- No global namespace pollution. ReactOnRails is the only global added.
- New API. Instead of placing React components on the global namespace, you instead call ReactOnRails.register, passing an object where keys are the names of your components.
```
import ReactOnRails from 'react-on-rails';
ReactOnRails.registerComponent({name: component});
```
Best done with Object destructing
```
import ReactOnRails from 'react-on-rails';
ReactOnRails.registerComponent(
{
Component1,
Component2
}
);
```
Previously, you used
```
window.Component1 = Component1;
window.Component2 = Component2;
```
This would pollute the global namespace. See details in the README.md for more information.
- Your jade template for the WebpackDevServer setup should use the new API:
```
ReactOnRails.render(componentName, props, domNodeId);
```
such as:
```
ReactOnRails.render("HelloWorldApp", {name: "Stranger"}, 'app');
```
- All npm dependency libraries updated. Most notable is going to Babel 6.
- Dropped support for react 0.13.
- JS Linter uses ShakaCode JavaScript style: https://github.com/shakacode/style-guide-javascript
- Generators account these differences.
## v1.2.2
### Fixed
- Missing Lodash from generated package.json [#175](https://github.com/shakacode/react_on_rails/pull/175)
- Rails 3.2 could not run generators [#182](https://github.com/shakacode/react_on_rails/pull/182)
- Better placement of jquery_ujs dependency [#171](https://github.com/shakacode/react_on_rails/pull/171)
- Add more detailed description when adding --help option to generator [#161](https://github.com/shakacode/react_on_rails/pull/161)
- Lots of better docs.
## v1.2.0

@@ -5,0 +51,0 @@ ### Added

8

package.json
{
"name": "react-on-rails",
"version": "2.0.0-rc.1",
"version": "2.0.0-rc.3",
"description": "react-on-rails JavaScript for react_on_rails Ruby gem",

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

"babel-core": "^6.3.17",
"babel-eslint": "^5.0.0-beta4",
"babel-eslint": "^5.0.0-beta6",
"babel-loader": "^6.2.0",

@@ -26,3 +26,4 @@ "babel-plugin-transform-runtime": "^6.3.13",

"eslint": "^1.10.3",
"eslint-config-airbnb": "^2.0.0",
"eslint-config-airbnb": "^2.1.1",
"eslint-config-shakacode": "0.0.1",
"eslint-plugin-babel": "^3.0.0",

@@ -33,2 +34,3 @@ "eslint-plugin-react": "^3.11.3",

"react-dom": "^0.14.3",
"react-transform-hmr": "^1.0.1",
"tap-spec": "^4.1.1",

@@ -35,0 +37,0 @@ "tape": "^4.4.0",

[![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)
# NEWS
2.0 is about to ship! Please grab the latest and let us know if you see any issues!
* https://rubygems.org/gems/react_on_rails
* https://www.npmjs.com/package/react-on-rails
* Branch: https://github.com/shakacode/react_on_rails/tree/npm-react-on-rails-js
* PR: https://github.com/shakacode/react_on_rails/pull/148
# React on Rails

@@ -109,8 +117,14 @@ React on Rails integrates Facebook's [React](https://github.com/facebook/react) front-end framework with Rails. Currently, both React v0.14 and v0.13 are supported, with server rendering. [Redux](https://github.com/rackt/redux) and [React-Router](https://github.com/rackt/react-redux) are supported as well. See the Rails on Maui [blog post](http://www.railsonmaui.com/blog/2014/10/03/integrating-webpack-and-the-es6-transpiler-into-an-existing-rails-project/) that started it all!

```ruby
gem "react_on_rails"
gem "react_on_rails", "~> 2.0.0"
```
2. Run the generator with a simple "Hello World" example:
2. See help for the generator:
```bash
rails generate react_on_rails:install --help
```
2. Run the generator with a simple "Hello World" example (more options below):
```bash
rails generate react_on_rails:install

@@ -117,0 +131,0 @@ ```

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