It’s just data

React.rb

Having determined that Angular.js is overkill for my blog rewrite, I started looking more closely at React.  It occurred to me that I could do better than JSX, so I wrote a Ruby2JS filter.  Compare for yourself.  Excerpt from the React tutorial:

var CommentList = React.createClass({
  render: function() {
    var commentNodes = this.props.data.map(function (comment) {
      return (
        <Comment author={comment.author}>
          {comment.text}
        </Comment>
      );
    });
    return (
      <div className="commentList">
        {commentNodes}
      </div>
    );
  }
});

Equivalent using the Ruby2JS filter:

class CommentList < React 
  def render
    _div.commentList do
      @@data.forEach do |comment|
        _CommentBlock comment.text, author: comment.author
      end
    end
  end
end

Note: I renamed the Comment class to CommentBlock to avoid a conflict with the existing Comment API.  I wouldn’t have thought that would be necessary, but things didn’t work until I made this change.

Full source for the tutorial reimplemented in Ruby is available.


Problem with Comment has been fixed.  Underlying cause was ruby2js attempting to us an ES6 feature: const.

Posted by Sam Ruby at

kolkata Escorts
kolkata Escort
kolkata Independent Escorts
kolkata call girl
kolkata Escort Service
escort in kolkata
escorts in kolkata
independent escort in kolkata
kolkata Independent Escort

kolkata call girls
call girls in kolkata
call girls kolkata

Posted by Ankita Tiwari at

Independent India Escorts is present 24×7 hours for you. You can call 0000000000 to book our VIP Call Girls in India. You can also pre-book call girls services to save your money. You can also do pre-booking to hire your dream girl on demand. Indian Escorts are famous call girls in India. We offer gorgeous and most adorable Indian Escorts we have a large and expanding variety in Jaipur Escort Service because every client has different choice and taste and especially abroad customers wants Indian Call Girls for fun and do high-quality romance that’s why we have expanded types in Indian Call Girls. Indian Escorts in Jaipur we have Kashmiri Call Girls, Jaipur Independent Escorts Call Girls, South Indian Call Girls, Jaipur Escort - Housewife Call Girls , Indian College Call Girls and Indian Teen Call Girls etc.
Gurgaon Escort Service
||
  Chandigarh Independent Hi-fi Female Escorts Service - romachopra.com

  Kolkata Independent Hi-fi Female Escorts Service - romachopra.com

  Punchkula Independent Hi-fi Female Escorts Service - romachopra.com
 
Mohali Independent Hi-fi Female Escorts Service - romachopra.com

Rishikesh Independent Hi-fi Female Escorts Service - romachopra.com

Ghaziabad Independent Hi-fi Female Escorts Service - romachopra.com
Lucknow Independent Hi-fi Female Escorts Service - romachopra.com

  Agra Independent Hi-fi Female Escorts Service - romachopra.com

  Allahabad Independent Hi-fi Female Escorts Service - romachopra.com
 
  Varanasi Independent Hi-fi Female Escorts Service - romachopra.com

  Udaipur Independent Hi-fi Female Escorts Service - romachopra.com
 
  Jalandhar Independent Hi-fi Female Escorts Service - romachopra.com

Mussoorie Independent Hi-fi Female Escorts Service - romachopra.com

  Jodhpur Independent Hi-fi Female Escorts Service - romachopra.com

  Ludhiana Independent Hi-fi Female Escorts Service - romachopra.com

  Dehradun Independent Hi-fi Female Escorts Service - romachopra.com

  Indore Independent Hi-fi Female Escorts Service - romachopra.com

Noida Independent Hi-fi Female Escorts Service - romachopra.com

  Amritsar Independent Hi-fi Female Escorts Service - romachopra.com

  Goa Independent Hi-fi Female Escorts Service - romachopra.com

  Bangalore Independent Hi-fi Female Escorts Service - romachopra.com

Kanpur Independent Hi-fi Female Escorts Service - romachopra.com

  Nainital Independent Hi-fi Female Escorts Service - romachopra.com
 
  Jhansi Independent Hi-fi Female Escorts Service - romachopra.com

 
  Ranchi Independent Hi-fi Female Escorts Service - romachopra.com

Mumbai Independent Hi-fi Female Escorts Service - romachopra.com

  Delhi Independent Hi-fi Female Escorts Service - romachopra.com

  Hyderabad Independent Hi-fi Female Escorts Service - romachopra.com

  Chennai Independent Hi-fi Female Escorts Service - romachopra.com

Ajmer Independent Hi-fi Female Escorts Service - romachopra.com

  Haridwar Independent Hi-fi Female Escorts Service - romachopra.com
Kolkata Escorts

Pune Escorts

Lucknow Escorts

Delhi Escorts

Goa Escorts

Dehradun Escorts

Dehradun Escort

Ludhiana Escorts

Chandigarh Escorts

Noida Escorts

Bangalore Escorts

Ahmedabad Escorts

Gurgaon Escorts

Posted by India Escorts at

Excellent! Been able to figure out how ours work with this post. Thanks.
click here

Posted by Brielle Luna at

Learned from the best and learned a lot. Great! clearviewwc.com/

Posted by Horea Kaii at

Simply wish to say your article is as astonishing. The clarity in your post is simply great, and I could assume you are an expert on this subject. Well with your permission let me grab your RSS feed to keep updated with forthcoming post. Thanks a million and please keep up the gratifying work.

Posted by WordPress Development Company at

kid’s safety app is one of the most trusted applications in the parental control landscape. Download parental control apps today.

Posted by child tracking app at

Diagnostic immobilier

Posted by Diagnostic immobilier at

hey thanks for this post. very informative!  https://fresno-cleaning.com/

Posted by James Gandom at

your solved my problem. Thanks

Posted by gaming jackets at

Your article is very good, I have read many articles but I am really impressed with your posts. Thank you, I will review this article. To know about me, try talking to me.

Posted by build royale at

Vedic Astrology
Vedic Astrology Services
Vedic Astrology Birth Chart
Astrologist In Chennai
Astrologers In Chennai
Astrological Services In Chennai
Hindu Vedic Astrology
Astrology Consultations In India
Astrologers Chennai
Astrologer Chennai
Astrology In Chennai
Kerala Astrologers In Chennai
Kerala Astrologer
Best Astrologers In Chennai
Famous Astrologers In Chennai
Astrology Consultant
Best Astrology Person In Chennai
Dubai Astrologers
Chennai Famous Astrologers
Astrology Consultant In India
Astrologers In India
Online Astrologers In India
Best Astrologers In India
Famous Astrologers In India
Good Astrologers In India
Vedic Astrologers In India

Posted by Numerologist in Chennai at

If you need any kind of assignment help, Then you can go AllAssignmentHelp.com. Here you will get high-quality assignment help. We have a team of assignment experts who will help you by delivering the contents as you desired.

Posted by assignment help at

Add your comment