README.md in react_on_rails-5.1.0 vs README.md in react_on_rails-5.1.1

- old
+ new

@@ -1,9 +1,9 @@ [![Build Status](https://travis-ci.org/shakacode/react_on_rails.svg?branch=master)](https://travis-ci.org/shakacode/react_on_rails) [![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) [![Code Climate](https://codeclimate.com/github/shakacode/react_on_rails/badges/gpa.svg)](https://codeclimate.com/github/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) # NEWS -* 5.1.0 has shipped!Please see the [CHANGELOG.md](./CHANGELOG.md) for details on the latest release and any breaking changes. +* 5.1.1 has shipped! Please see the [CHANGELOG.md](./CHANGELOG.md) for details on the latest release and any breaking changes. * [New slides on React on Rails](http://www.slideshare.net/justingordon/react-on-rails-v4032). * 2016-02-28: We added a [Projects page](./PROJECTS.md) and a [Kudos page](./KUDOS.md). Please edit the page your project or [email us](mailto:contact@shakacode.com) and we'll add you. We also love stars as it helps us attract new users and contributors. * *See [NEWS.md](NEWS.md) for the full news history.* # NOTES @@ -127,11 +127,11 @@ ## Getting Started 1. Add the following to your Gemfile and bundle install: ```ruby - gem "react_on_rails", "~> 4" + gem "react_on_rails", "~> 5" ``` 2. See help for the generator: ```bash @@ -232,17 +232,23 @@ # URL settings href: request.original_url, location: "#{uri.path}#{uri.query.present? ? "?#{uri.query}": ""}", scheme: uri.scheme, # http host: uri.host, # foo.com + port: uri.port, pathname: uri.path, # /posts search: uri.query, # id=30&limit=5 # Locale settings i18nLocale: I18n.locale, i18nDefaultLocale: I18n.default_locale, - httpAcceptLanguage: request.env["HTTP_ACCEPT_LANGUAGE"] + httpAcceptLanguage: request.env["HTTP_ACCEPT_LANGUAGE"], + + # Other + serverSide: boolean # Are we being called on the server or client? NOTE, if you conditionally + # render something different on the server than the client, then React will only show the + # server version! } ``` #### Use Cases ##### Needing the current url path for server rendering @@ -325,10 +331,10 @@ + **options:** + **props:** Ruby Hash which contains the properties to pass to the react object, or a JSON string. If you pass a string, we'll escape it for you. + **prerender:** enable server-side rendering of component. Set to false when debugging! + **id:** Id for the div. This will get assigned automatically if you do not provide an id. + **html_options:** Any other html options to get placed on the added div for the component. - + **trace:** set to true to print additional debugging information in the browser. Defaults to true for development, off otherwise. + + **trace:** set to true to print additional debugging information in the browser. Defaults to true for development, off otherwise. Note, on the client you will so both the railsContext and your props. On the server, you only see the railsContext being logged. + **replay_console:** Default is true. False will disable echoing server-rendering logs to the browser. While this can make troubleshooting server rendering difficult, so long as you have the default configuration of logging_on_server set to true, you'll still see the errors on the server. + **raise_on_prerender_error:** Default is false. True will throw an error on the server side rendering. Your controller will have to handle the error. ### redux_store #### Controller Extension