30 Mar '17, 9am

react-on-rails JavaScript for react_on_rails Ruby gem

react-on-rails JavaScript for react_on_rails Ruby gem

You may wish to have 2 React components share the same the Redux store. For example, if your navbar is a React component, you may want it to use the same store as your component in the main area of the page. You may even want multiple React components in the main area, which allows for greater modularity. In addition, you may want this to work with Turbolinks to minimize reloading the JavaScript. A good example of this would be something like a notifications counter in a header. As each notification is read in the body of the page, you would like to update the header. If both the header and body share the same Redux store, then this is trivial. Otherwise, we have to rely on other solutions, such as the header polling the server to see how many unread notifications exist.

Full article: https://www.npmjs.com/package/react-on-rails

Tweets

A React Rendering Misconception

robots.thoughtbot.com 05 Apr '17, 12am

Part of the misconception was that I didn’t understand that rendering a component and updating the DOM for that component ...