React.rb updates
I’ve made a number of updates to the demos. The tutorial demo has been updated to do server side rendering. This means that it is able to be used by clients which either don’t support or have turned off JavaScript. To run:
git clone https://github.com/rubys/ruby2js.git cd ruby2js/demo bundle update ruby react-tutorial.rb
Visit the URL (typically http://localhost:4567/) and enter a comment. Visit the same URL in a different tab or a different browser and enter another comment. Switch back to the original browser/tab. If you have client side JavaScript disabled, you will need to hit refresh.
The second demo is a calendar. To get started:
git clone https://github.com/rubys/wunderbar.git cd wunderbar/demo/calendar bundle update rackup
Visit the URL (typically http://localhost:9292/). This will take you to the current month. Left and right arrows will take you different months (and update the URL). Unlike the tutorial which is a single file, this application is organized in a manner more consistent with how I expect projects to be organized.