Sha256: 3a4baa798055eadb519a6f34b9f98f8363e7ddd82b1b90a726ece580fbf62d97

Contents?: true

Size: 438 Bytes

Versions: 1

Compression:

Stored size: 438 Bytes

Contents

# app/views/components/home/show.rb

module Components
  
  module Home
    
    class Show

      include React::Component   # will create a new component named Show
      
      optional_param :say_hello_to
      other_params :others

      def render  
        puts "Rendering my first component!"
        "hello #{'there '+say_hello_to if say_hello_to}"  # render "hello" with optional 'there ...'
      end

    end
    
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
reactive-ruby-0.7.8 example/rails-tutorial/app/views/components/home/show.rb