Sha256: f9ca223e0eca427137b0367c87cdb7d387dc1eecb24036194a626048f0243ec2
Contents?: true
Size: 501 Bytes
Versions: 51
Compression:
Stored size: 501 Bytes
Contents
require 'opal' require 'jquery' require 'opal-jquery' require 'opal-haml' require 'vienna' require "react" require 'models/todo' require "components/app.react" Document.ready? do element = React.create_element(TodoAppView, filter: "all") component = React.render(element, Element.find('#todoapp').get(0)) Vienna::Router.new.tap do |router| router.route('/:filter') do |params| component.set_props(filter: params[:filter].empty? ? "all" : params[:filter]) end end.update end
Version data entries
51 entries across 51 versions & 3 rubygems