Sha256: f5f6103856416b76eb73e2b5471e8e325449522cb8a096a3b2035522bc23214f

Contents?: true

Size: 288 Bytes

Versions: 2

Compression:

Stored size: 288 Bytes

Contents

# tutorial1.rb

require 'opal'
require 'opal/react'

class CommentBox < React::Component

  def render
    div(className: 'commentBox') do
      'Hello, world! I am a CommentBox.'
    end
  end
end

include React::DOM

$$.console.log ReactDOMServer.renderToStaticMarkup(
  CommentBox()
)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
opal-react-0.0.4 tutorial/tutorial1.rb
opal-react-0.0.3 tutorial/tutorial1.rb