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

a href="hhttp://www.govtjobcorner.com/himachal-pradesh-pat-admit-card///">Himachal Pradesh PAT Admit Card 2018 | HP PAT Exam Date</a> :wow this articlso amezing. i m so impress.

Posted by HRITIK at

Thanks for sharing nice information with us. i like your post and all you share with us is uptodate and quite informative, i would like to bookmark the page so i can come here again to read you, as you have done a wonderful job. Cincinnati Ohio

Posted by BachJohann at

by visiting this site I found cool stuff here keep it up.

Posted by CS Assignment Help at

This is really great work. Thank you for sharing such a good and useful information here in the blog for students.

Posted by Online Programming Homework Help at

Students could often find it tough to write their academic tasks. It could lead to they not getting desired grades in the academics. Opting for our assignment help online could be ideal for such students and they can get a complete assignment solution from us. https://www.allassignmenthelp.com

Posted by assignment help online at

Positive site, where did u come up with the information on this posting?I have read a few of the articles on your website now, and I really like your style. Thanks a million and please keep up the effective work. florida map

Posted by BachJohann at

I really appreciate this wonderful post that you have provided for us. I assure this would be beneficial for most of the people. healthfama

Posted by BachJohann at

دانلود قسمت چهارم فصل سوم سریال شهرزاد با لینک مستقیم, دانلود رایگان کامل قسمت 4 چهار فصل 3 سریال شهرزاد با لینک مستقیم راحت اسان کم حجم کیفیت بالا عالی, قسمت چهار 4 فصل سه 3 شهرزاد با لینک مستقیم سریال ایرانی جدید ساخته حسن فتحی بدون تگ آرم تبلیغاتی نیاز به خرید اشتراک ویژه با لینک مستقیم دانلود شهرزاد قسمت چهارم

Posted by BachJohann at

really appreciate this wonderful post that you have provided for us. thank u so much

Posted by Kerala HSC Date Sheet at

I really appreciate the post. It is very informative.

Posted by Quality hub at

I really appreciate the post. It is very informative.

Posted by Bonnie murithi at

I really enjoyed reading your post. very informative blog and very exciting to know more on this topic.

Posted by My Assignment Help at

The government of Tamil Nadu releases their results on their official websites, but the higher authority does not yet announce the

official website of publishing the results,

Posted by SSLC Result 2018 Tamilnadu at

This is very nice information share with me

Posted by website development company in delhi at

I am an antique article collector and this article is one of the best I have ever read. I hope to see the same amazing work from you in future. Thanks Marketing Assignment help

Posted by Assignment Help at

Very helpful advice in this particular post! It’s the little changes that make the largest changes. Thanks for sharing!

Posted by impossible game at

It Is Very Interesting post. Thanks for share.

Posted by Dry Cleaners Point at

I havent any word to value this post.....Really i am inspired from this post....the individual who make this post it was an extraordinary human..thanks for imparted this to us. Chinese Gender Predictor

Posted by BachJohann at

Car insurance is an agreement amongst you and the insurance organization that ensures you against money related misfortune in case of a mischance or robbery.

Posted by Car Insurance at

really appreciate this wonderful post that you have provided for us. I assure this would be beneficial for most of the people.
Regards
Indoor Exercise Bike Reviews

Posted by Daljeet Arora at

As Js is very powerful programming language as you can use it in so many places.

Posted by itunes customer service at

Visit here

Posted by website designing company in Delhi at

Visit Website-: [link]

Posted by razzmic at

Things are very open and intensely clear explanation of issues. was truly information. Your website is very beneficial.

Posted by Writing Service at

I loved the post, keep posting interesting posts. I will be a regular reader…
I am offering dissertation help to students in UK at low price.

Posted by Dissertation Help at

Thanks for sharing this information.

Posted by Aneta at

Things are very open and intensely clear explanation of issues. was truly information. Your website is very beneficial.

Posted by Chi-Square Homework Help | AcademicPaperWriter.com at

Thanx for sharing such useful post keep it up :)

Posted by 1800 Buy Ireland Case Help at

Things are very open and intensely clear explanation of issues. was truly information. Your website is very beneficial.

Posted by Business Ethics Project Help at

I am very glad that I got to this site

Posted by jurek22aa at

I read some articles on this site and I think your blog is really interesting and has great information. Thank you for your sharing.

Posted by windows product key at

This is extremely exceptionally decent post you shared, I like the post...I am offering assignment help to students in Singapore at low price.

Posted by Assignment Help at

Thanks a lot for this wonderful post, I am really very impressed to see this..!

Posted by windows product key at

Instead of sending a generic brown or white envelope, you should seriously consider using customized envelopes. Cheap Brochure Print

Posted by Anonymous at

These are also made with a special release paper but the ink that is used for these is the same ink that is used in the traditional screen print method. custom printed shirts

Posted by joe root at

I have read your article. it is very informative and helpful for me.I admire the valuable information you offer in your articles. Thanks for posting it, again!

Posted by product key at

We have many clients of liability insurance in New York that are satisfied with premium. Provide us the information we will give you quick quote rate. Liability Insurance

Posted by Liability Insurance at

Commendable job with the article! It was really informative and enriching. Looking forward to more such posts in the future. Keep us updated with what’s in store! Will surely keep frequenting this website.
<a href=https://www.makemyassignments.com/assignment-maker/ >Assignment Maker</a>

Posted by aisha oberoi at

All you have to do is keep track of how many postcards you mail out against new enquiries, leads and actual sales. fifty fiveprint company

Posted by samsung at

Men and women who are getting married traditionally celebrate this lifestyle change by holding a last hurrah to being single and free by having a hen party or a stag party. cheap event ticket printing

Posted by Anonymous at

How to login Hotmail? Today I am going to show you how to login to any Hotmail account on Desktop and Mobile. If you have a Hotmail account but you don’t know how to sign in Hotmail, this post helps you login Hotmail easy way with pictures. If you don’t have Hotmail account, of course, let Sign up Hotmail. And now, Here is how to sign in Hotmail.

Posted by hotmail at

Your content is great. It is always impossible for me to read it at the same time.

Posted by login hotmail at

Commendable job with the article! It was really informative and enriching. Looking forward to more such posts in the future. Keep us updated with what’s in store! Will surely keep frequenting this website.
HRM Assignment Help

Posted by aisha oberoi at

Great, your article gives me useful information and a fresh perspective on the subject.

Posted by windows 8 product key at

Congrats on having such well managed site! It has good looks and contains informative content as well.We are an online platform where students check & write reviews for assignments related websites.Here you can check Allassignmenthelp reviews

Posted by myassignmenthelp reviews at

Reactrb has been reamed Hyper-react and moved to the Ruby Hyper loop umbrella project Captain Marvel Hoodie

Posted by anonymous at

Your work is very good and I appreciate you and hopping for some more informative posts. Thank you for sharing great information to us.

Posted by Blog da Julia at

This is my first time i visit here. I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here! keep up the good work

Posted by TimeTrexwww.sfce.ca at

This is also a very good post which I really enjoyed reading.

Posted by best free sports streaming sites at

Thank you so much for the post you do. I like your post and all you share with us is up to date and quite informative, i would like to bookmark the page so i can come here again to read you, as you have done a wonderful job.

Posted by subicevac.com at

Very interesting blog. Alot of blogs I see these days don’t really provide anything that I’m interested in, but I’m most definately interested in this one. Just thought that I would post and let you know.

Posted by www.amonarttattoo.com at

I just want to let you know that I just check out your site and I find it very interesting and informative..

Posted by acim at

It proved to be Very helpful to me and I am sure to all the commentators here!

Posted by un curso de milagros at

For qualitative human rights topics for research paper visit at Students Assignment Help. We will offer you a custom made assignment with proper referencing.

Posted by Human Rights Topics For Research Paper at

Great knowledge, do anyone mind merely reference back to it

Posted by acim at

You know your projects stand out of the herd. There is something special about them. It seems to me all of them are really brilliant!

Posted by lessons online at

The information you have posted is very useful. The sites you have referred was good. Thanks for sharing...

Posted by non duality teachers at

Thank you for taking the time to publish this information very useful!

Posted by online study resources at

I’ve been surfing online more than three hours today, yet I never found any interesting article like yours. It’s pretty worth enough for me. In my opinion, if all webmasters and bloggers made good content as you did, the web will be a lot more useful than ever before.

Posted by nondual teacher at

I am happy to find your distinguished way of writing the post. Now you make it easy for me to understand and implement the concept. Thank you for the post.

Posted by un curso de milagros at

I really loved reading your blog. It was very well authored and easy to undertand. Unlike additional blogs I have read which are really not tht good. I also found your posts very interesting. In fact after reading, I had to go show it to my friend and he ejoyed it as well!

Posted by youtube at

I got what you mean  , thanks  for posting .Woh I am happy  to find this website through google.

Posted by visit here at

Pretty nice post. I just stumbled upon your weblog and wanted to say that I have really enjoyed browsing your blog posts. After all I’ll be subscribing to your feed and I hope you write again soon!

Posted by see this here at

Thanks for your post. I’ve been thinking about writing a very comparable post over the last couple of weeks, I’ll probably keep it short and sweet and link  to this instead if thats cool. Thanks.

Posted by learn here at

I am very happy to discover your post as it will become on top in my collection of favorite blogs to visit.

Posted by check it out at

I really like your writing style,  great  information,  thankyou  for posting.

Posted by go now at

Your blog provided us with valuable information to work with. Each &  every tips of your post are awesome. Thanks a lot for sharing. Keep blogging,

Posted by Michigan Auto Accident Lawyer at

Thanks for sharing such a nice piece of information to us. This is very knowledgeable for me. I am John and i am offering Assignment Help to students of Australia and all over the world.

Posted by Assignment Help at

I felt very happy while reading this site. This was really very informative site for me. I really liked it. This was really a cordial post. Thanks a lot!.

Posted by jual mobil bekas at

Thanks for the informative article one of the best site to rely on. The articles are crisp to the point and the information is reliable. visit here: Coursework Help

Posted by Coursework Help at

Good news. Appreciate this post. Thank you for compiling and sharing it.

We published a research report of top React Native app developers and Blockchain app developers worldwide. Share your feedback with  us.

Posted by MobileAppDaily at

“These you will then see the most important thing, the application provides you a website a powerful important internet page:” Hydroface® – Μόνο Με 32 Ευρώ

Posted by james thomas at

Super-Duper site! I am Loving it!! Will come back again, Im taking your feed also, Thanks.

Posted by monbazar.ca at

Hello, I have browsed most of your posts. This post is probably where I got the most useful information for my research. Thanks for posting, maybe we can see more on this. Are you aware of any other websites on this subject.

Posted by ottawadistributionservices.ca at

This is just the information I am finding everywhere. Thanks for your blog, I just subscribe your blog. This is a nice blog..

Posted by sharrardlaw.com at

visit here

Posted by Ladies Designer Dress in Mumbai at

For more information visit here

Posted by technical writing training pune at

This is just the information I am finding everywhere. Thanks for your blog, I just subscribe your blog. This is a nice blog..

Posted by gmail login at

This is a great inspiring article. I am pretty much pleased with your good work. You put really very helpful information. Keep it up. Keep blogging. Looking to reading your next post.

Posted by www.neuronenglish.ro/invata-engleza-rapid at

Good article, but it would be better if in future you can share more about this subject. Keep posting.

Posted by advaita teachers at

Thankyou  for this  wondrous post, I am glad I  observed  this website  on yahoo.

Posted by a course in miracles at

It is good to read such a valuable information and thanks for sharing it. Live web tutors is striving towards creating a great learning platform and hence, provide authentic assignment help to make it more informative.

Posted by bigg boss tamil vote online at

I good nice points about the topic from this post and entire data has explained very well

Posted by Jodie Whittaker Doctor Who Long Coat at

I appreciate your all efforts about your thoughts. it’s really good work. well done. I would like to share something really helpful for Health. Visit Also On Chamomile Kombucha

Posted by Chamomile Kombucha at

This will go a long way to impact positively on the readers, keep up the good work

Posted by Buy dissertation online at

I wouldn’t have thought that would be necessary, but things didn’t work until I made this change....

Posted by clicker heroes at

Hello Author...Your article is so creative which represents very useful information. Reader-friendly writing style.Thanks!! background check best service

Posted by background check best service at

Nice Informative Blog having nice sharing..

Posted by suzuki coin at

Add your comment