- Support
config.react.server_renderer_directories
in initializers #729
- Fix Railtie watcher to update its timestamp when files change #722
- Don't use
yarn
binstub because webpacker doesn't provide it anymore #717
- Improve error handling when components aren't found #704
- Camelize filename when generating for webpack #703
- Include node module boilerplate when generating for webpack #710
- Don't look for non-existent
Turbolinks.EVENTS
#708
- Support Rails 5.1 #697
- Fix UJS unmounting by selector #696
- Rerun events detection at any time with
ReactRailsUJS.detectEvents()
#693 - Make the NPM version of
react_ujs
match the Rubygem version
2.0.1
was skipped because a bad version of react_ujs
was published to NPM.
-
Server rendering loads
server_rendering.js
by default #471 . Upgrade by adding a new file which requires the previous defaults:// app/assets/javascripts/server_rendering.js // = require react-server // = require components
- Webpacker support:
react_component
can find components viarequire.context
+ReactRailsUJS.useContext
#678- Server rendering detects Webpacker and uses packs #683, #687
ReactRailsUJS
is available fromnpm
withyarn add react_ujs
ornpm install react_ujs
#678
per_request_react_rails_prerenderer
Allows you to check out a renderer for the whole request instead of once-per-react_component
#559
- Improved watching of server-rendering JS files #687
- Fix console replay:
- Put the
<script>
tag outside the React.js container to avoid React warnings #691 - Clear console history between renders #692
- Put the
- Use better Turbolinks events #690
- Support
prerender: false
when rendering in a controller #680 - Update React to
15.4.2
#681
- Fix joining asset path in YamlManifestContainer #679
- Remove
coffee-script-source
from dependencies. #667 If you have a version conflict, you should specify the proper version yourself.
- Alias
window = this;
has been removed from the default server rendering JavaScript to improve detection of the server rendering environment. To get the old behavior, you can add the alias in your own server rendering code. #615
- Calling
setTimeout
orclearTimeout
in server rendering will raise an informative error because they aren't supported #618 prerender:
options will be passed to server renderer methods #641react_component(..., camelize_props:)
option will override the application default #642, #645- Ship with React.js 15.4.1 #646
- use
['default']
accessor to support old JavaScript versions #619 react_component
with a block will correctly render the content inside thediv
- Accept extra JS code in
code:
option for SprocketsRenderer #604
- Use
asset_prefix
for YamlContainer #598 - Fix requiring
.js
from.es6.jsx
#591
- Update to React 15.3.0 #583
- Fix
//= require
on Sprockets 3.7+ #582
- Update to React 15.2.1 #569
- Fix deprecation warnings on Sprockets 3.7+ #574
- Stop building broken addons files #576
- Sprockets 4 Support 🎉 #560
- Depend on Railties, not Rails #558
- Don't depend on
sprockets/railtie
#558 - Expose
React.camelize_props(props_hash)
#556 - Add
rails generate react:ujs --output=...
for copying the UJS into your app #557 - Support Babel 6 module exports & extension point
ReactRailsUJS.getConstructor
#503
- Improved error messages for missing components #538
- Fix
view_helper_implementation
config #551 - Fallback to
EnvironmentContainer
for server rendering when manifest isn't available #545
- Update to React 15.0.2 #525
- Update
.to_prepare
for Rails 5 #526 - Use
register_engine
with Sprockets 3 to avoid compiling all files #522
- Update to React 15.0.1 #512
- Support PJAX #518
- Static renders don't include
data-react-
attributes #497
- Better unmounting on Turbolinks 5 #521
- Fix console replay #496
- Fix Server Rendering for Rails 3.2 #487
- UJS can mount and unmount a component by ID (not only the component's children) #466
- Support Turbolinks 5 #475
- Support nested arrays with
camelize_props
#480 - Improve Sprockets 3 compatibility #453
- Fix install-generator
require
spacing #476
- Individual add-ons can be included in a bundle with sprockets require directives. #457
- Support
sprockets-rails
3 #430 - Update to React 0.14.6
- Fix install generator when
//= require
s are malformed #463 - Use
before_action
if available #456 - Add CHANGELOG to gem bundle #471
- Use
window.attachEvent
to support IE8 without jQuery 😬#446
- Update to React 0.14.3 #412
config.react.camelize_props = true
will camelizereact_component
prop keys #409
- Fix chained
.es6
file names with JSX processor #411 - Don't insert
// =require
s multiple times #398
- Component generator
--coffee
option #387 - Support Sprockets 4 with a JSX processor #385
- Support custom attributes when rendering from controller #384
- Minify & optimize the production build of React.js #380
- Include React.js 0.14
- Also support React 0.14 in
unmountComponents
#372 - Use a fallback view helper in case a Rails controller wasn't used #375
- The UJS can mount and unmount components within a given DOM node #358
- Support dropped-in React 0.14 in UJS #366
- Use controller lifecycle hooks for view helper (tests don't run middlewares) #356
- Render components directly from the controller with
render component: ...
#329 - Provide a custom view helper with
config.react.view_helper_implementation
#346
- Allow
react-rails
configs to be set in initializers #347
- Support
--es6
option in component generator #332 - Support Sprockets 3 #322
- Don't bother unmounting components
onBeforeUnload
#318 - Include
React::Rails::VERSION
in the gem #335
-
Changed server rendering configuration names #253
Old New config.react.timeout
config.react.server_renderer_timeout
config.react.max_renderers
config.react.server_renderer_pool_size
config.react.react_js
config.react.server_renderer_options[:files]
config.react.component_filenames
config.react.server_renderer_options[:files]
config.react.replay_console
config.react.server_renderer_options[:replay_console]
(none) config.react.server_renderer
-
JSX is transformed by Babel, not JSTransform #295
- Allow custom renderers for server rendering #253
- Server render with
renderToStaticMarkup
viaprerender: :static
#253 - Accept
config.react.jsx_transform_options = {asset_path: "path/to/JSXTransformer.js"}
#273 - Added
BabelTransformer
for transforming JSX #295 - Added
ExecJSRenderer
to server rendering tools - Accept
config.react.jsx_transformer_class
#302
JSXTransformer
won't be updated
- Fix gem versions in tests #270
- Expire the Sprockets cache if you change React.js builds #257
- Instead of copying builds into local directires, add different React.js builds to the asset pipeline #254
- Camelize attribute names in the component generator #262
- Add
tilt
dependency #248 - Default prerender pool size to 1 #302
- Vendor versions of React.js with
config.variant
,config.addons
and//= require react
- Component generator
- View helper and UJS for mounting components
- Server rendering with
prerender: true
- Transform
.jsx
in the asset pipeline