Skip to content

Commit 0c1e60c

Browse files
committed
Merge resolved
2 parents 691d2aa + 3657729 commit 0c1e60c

File tree

14 files changed

+37273
-23506
lines changed

14 files changed

+37273
-23506
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,17 @@
22

33
#### Breaking Changes
44

5+
- React Deprecations for 15.4, 15.5, 15.6 in preparation for 16 handled in prebundled version
6+
57
#### New Features
68

9+
- Generator now makes modern style `createReactClass`(JS) or `extends React.Component`(ES6, CoffeeScript) code
10+
711
#### Deprecation
812

13+
- Next version will drop the addons option as they are not supported with React 16
14+
- TheRubyRacer's newest version (0.12.3 at time of writing) only supports libV8 (3.16.14.15) which is too old for some new JS features, future versions of this gem will need more modern ExecJS runtimes such as mini_racer (currently on libV8 5.9.x)
15+
916
#### Bug Fixes
1017

1118
## 2.3.0

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ var Post = createReactClass({
402402
</div>
403403
);
404404
}
405-
});
405+
};
406406
```
407407
408408
The generator also accepts options:
@@ -474,6 +474,8 @@ You can also specify this option in `react_component`:
474474
## Development
475475
476476
- Run tests with `rake test` or `appraisal rake test`
477+
- Integration tests run in Headless Chrome which is included in Chrome (59+ linux,OSX | 60+ Windows)
478+
- ChromeDriver is included with `chromedriver-helper` gem so no need to manually install that 👍
477479
- Update React assets with `rake react:update`
478480
- Update the UJS with `rake ujs:update`
479481
- Releases:

lib/assets/react-source/development/react-server.js

Lines changed: 19401 additions & 5693 deletions
Large diffs are not rendered by default.

lib/assets/react-source/development/react.js

Lines changed: 17766 additions & 17790 deletions
Large diffs are not rendered by default.

lib/assets/react-source/production/react-server.js

Lines changed: 20 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/assets/react-source/production/react.js

Lines changed: 20 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/generators/react/component_generator.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,7 @@ def file_header
137137

138138
def file_footer
139139
if webpacker?
140-
if options[:es6]
141-
%|export default #{component_name}|
142-
else
143-
%|module.exports = #{component_name}|
144-
end
140+
%|export default #{component_name}|
145141
else
146142
''
147143
end

lib/generators/templates/component.js.jsx.coffee

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
class @<%= component_name %> extends React.Component
1+
<%= file_header %>class @<%= component_name %> extends React.Component
22
<% if attributes.size > 0 -%>
33
@propTypes =
44
<% attributes.each do |attribute| -%>
@@ -16,3 +16,4 @@ class @<%= component_name %> extends React.Component
1616
<% else -%>
1717
`<div />`
1818
<% end -%>
19+
<%= file_footer %>

react-builds/react-browser.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
var React = require("react");
22
var ReactDOM = require("react-dom");
33
var createReactClass = require("create-react-class");
4+
var PropTypes = require("prop-types");
45

56
window.React = React;
67
window.ReactDOM = ReactDOM;
78
window.createReactClass = createReactClass;
9+
window.PropTypes = PropTypes;

react-builds/react-server.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
var React = require("react");
22
var ReactDOMServer = require("react-dom/server");
33
var createReactClass = require("create-react-class");
4+
var PropTypes = require("prop-types");
45

56
global.React = React;
67
global.ReactDOMServer = ReactDOMServer;
78
global.createReactClass = createReactClass;
9+
global.PropTypes = PropTypes;

0 commit comments

Comments
 (0)