React vs. AngularJS: Let’s make an app to compare!
Update: Thank you guys for voting me up to the top of Hacker News!
Update: React was a side project that I reviewed the day it launched, and you guys liked this post. Please try Rate My App, where you improve every morning with daily video feedback for new side projects from Show HN and Product Hunt. Thanks!
In the AngularJS version below, the HTML speaks for itself.
1) power the form, 2) redraw the comments, and 3) render Markdown in HTML
Of course, we may want to save the new comment to a server, so we simply add a few more lines:
And if we want to automatically update the comments every 5 seconds, we simply add the following lines:
For an interactive demo, I created a jsFiddle here: http://jsfiddle.net/vla/Cdrse/
What does the Facebook “React” tutorial look like? Here you go!
If you like this post, and want more, I post daily videos of new side projects found on Hacker News and Product Hunt. Once you visit Rate My App (@ratemyapp, ratemyapp.com), sign up for the newsletter, because we’re launching a podcast so you can take the show to the shower or your morning commute! For the Rate My App newsletter, please enter your email address here.
You can follow me on twitter: @vla. I’m vlad on Hacker News and GitHub. No recruiters, please.