diff --git a/CHANGELOG.md b/CHANGELOG.md index 370e95a08..12a20f6a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ Contributors: please follow the recommendations outlined at [keepachangelog.com] ## [Unreleased] +## [6.2.1] - 2016-11-19 +- Removed unnecesary passing of context in the HelloWorld Container example and basic generator. [#612](https://github.com/shakacode/react_on_rails/pull/612) by [justin808](https://github.com/justin808) + ## [6.2.0] - 2016-11-19 ##### Changed - Updated the generator templates to reflect current best practices, especially for the redux version. [#584](https://github.com/shakacode/react_on_rails/pull/584) by [nostophilia](https://github.com/nostophilia). @@ -378,7 +381,8 @@ Best done with Object destructing: ##### Fixed - Fix several generator related issues. -[Unreleased]: https://github.com/shakacode/react_on_rails/compare/6.2.0...master +[Unreleased]: https://github.com/shakacode/react_on_rails/compare/6.2.1...master +[6.2.1]: https://github.com/shakacode/react_on_rails/compare/6.2.0...6.2.1 [6.2.0]: https://github.com/shakacode/react_on_rails/compare/6.1.2...6.2.0 [6.1.2]: https://github.com/shakacode/react_on_rails/compare/6.1.1...6.1.2 [6.1.1]: https://github.com/shakacode/react_on_rails/compare/6.1.0...6.1.1 diff --git a/lib/generators/react_on_rails/templates/no_redux/base/client/app/bundles/HelloWorld/containers/HelloWorldContainer.jsx b/lib/generators/react_on_rails/templates/no_redux/base/client/app/bundles/HelloWorld/containers/HelloWorldContainer.jsx index 0c7a4df69..aacfb43bb 100644 --- a/lib/generators/react_on_rails/templates/no_redux/base/client/app/bundles/HelloWorld/containers/HelloWorldContainer.jsx +++ b/lib/generators/react_on_rails/templates/no_redux/base/client/app/bundles/HelloWorld/containers/HelloWorldContainer.jsx @@ -7,8 +7,8 @@ export default class HelloWorldContainer extends React.Component { name: PropTypes.string.isRequired, // this is passed from the Rails view }; - constructor(props, context) { - super(props, context); + constructor(props) { + super(props); // How to set initial state in ES6 class syntax // https://facebook.github.io/react/docs/reusable-components.html#es6-classes @@ -19,9 +19,7 @@ export default class HelloWorldContainer extends React.Component { render() { return ( -
- -
+ ); } } diff --git a/lib/generators/react_on_rails/templates/no_redux/base/client/app/bundles/HelloWorld/startup/HelloWorldApp.jsx.tt b/lib/generators/react_on_rails/templates/no_redux/base/client/app/bundles/HelloWorld/startup/HelloWorldApp.jsx.tt index 4fed4fc54..9a49aeeb6 100644 --- a/lib/generators/react_on_rails/templates/no_redux/base/client/app/bundles/HelloWorld/startup/HelloWorldApp.jsx.tt +++ b/lib/generators/react_on_rails/templates/no_redux/base/client/app/bundles/HelloWorld/startup/HelloWorldApp.jsx.tt @@ -3,7 +3,8 @@ import ReactOnRails from 'react-on-rails'; import HelloWorldContainer from '../containers/HelloWorldContainer'; -const HelloWorldApp = (props) => ( +// _railsContext is the Rails context, providing contextual information for rendering +const HelloWorldApp = (props, _railsContext) => ( ); diff --git a/lib/react_on_rails/version.rb b/lib/react_on_rails/version.rb index cc26bd923..853556300 100644 --- a/lib/react_on_rails/version.rb +++ b/lib/react_on_rails/version.rb @@ -1,4 +1,4 @@ # frozen_string_literal: true module ReactOnRails - VERSION = "6.2.0".freeze + VERSION = "6.2.1.rc.3".freeze end diff --git a/package.json b/package.json index 696c2a134..d3d50501c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-on-rails", - "version": "6.2.0", + "version": "6.2.1-rc.3", "description": "react-on-rails JavaScript for react_on_rails Ruby gem", "main": "node_package/lib/ReactOnRails.js", "directories": { diff --git a/spec/dummy/Gemfile.lock b/spec/dummy/Gemfile.lock index 07776b455..bfda09897 100644 --- a/spec/dummy/Gemfile.lock +++ b/spec/dummy/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - react_on_rails (6.2.0) + react_on_rails (6.2.1.rc.3) addressable connection_pool execjs (~> 2.5) diff --git a/spec/dummy/client/app/components/HelloWorld.jsx b/spec/dummy/client/app/components/HelloWorld.jsx index 94f995043..1c82f33a5 100644 --- a/spec/dummy/client/app/components/HelloWorld.jsx +++ b/spec/dummy/client/app/components/HelloWorld.jsx @@ -17,8 +17,8 @@ class HelloWorld extends React.Component { }; // Not necessary if we only call super, but we'll need to initialize state, etc. - constructor(props, context) { - super(props, context); + constructor(props) { + super(props); this.state = props.helloWorldData; this.setNameDomRef = this.setNameDomRef.bind(this); this.handleChange = this.handleChange.bind(this); diff --git a/spec/dummy/client/app/components/HelloWorldRedux.jsx b/spec/dummy/client/app/components/HelloWorldRedux.jsx index 29e001f86..1f71c6ce3 100644 --- a/spec/dummy/client/app/components/HelloWorldRedux.jsx +++ b/spec/dummy/client/app/components/HelloWorldRedux.jsx @@ -11,8 +11,8 @@ export default class HelloWorldRedux extends React.Component { }; // Not necessary if we only call super, but we'll need to initialize state, etc. - constructor(props, context) { - super(props, context); + constructor(props) { + super(props); this.setNameDomRef = this.setNameDomRef.bind(this); this.handleChange = this.handleChange.bind(this); }