# Can Reactjs be used as a View within Emberjs?

**URL:** https://discuss.emberjs.com/t/can-reactjs-be-used-as-a-view-within-emberjs/3470
**Category:** Proposals
**Created:** [November 30, 2013, 10:04am UTC](https://discuss.emberjs.com/t/can-reactjs-be-used-as-a-view-within-emberjs/3470 "2013-11-30T10:04:04Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![scottmessinger](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/scottmessinger/32/14211_2.png) [@scottmessinger](https://discuss.emberjs.com/u/scottmessinger)
#### Post date: [December 2, 2013, 9:15pm UTC](https://discuss.emberjs.com/t/can-reactjs-be-used-as-a-view-within-emberjs/3470/7 "2013-12-02T21:15:54Z")

</div>

Hi @tarasm, Sorry if I’m being dense about this, but I’m not yet seeing the difference. It seems Ember Views also have “template & javascript mixed together”. Here’s how I would write your example in Ember:

```auto
var LikeButton = Ember.View.extend({
  init: function() {
   this._super()
    this.set('liked', false};
  },
  likedText: function(){
    return(this.get('liked') ? 'like' : 'unlike')
  }.property('liked'),

  click: function(event) {
    this.set('liked', !this.get('liked')); // or this.toggleProperty('liked')
  },
  template: Ember.Handlebars.compile("
    <p>
        You {{likedText}} this. Click to toggle.
    </p>
  ")
});

LikeButton.create().appendTo('#example')

```

Help me understand – how is this different than React.js? We’ve changed some names (e.g. `render` =\> `template`, `handleClick` =\> `click`) but, as far as I can tell, the code samples are nearly identical.

---

_[View the full topic](https://discuss.emberjs.com/t/can-reactjs-be-used-as-a-view-within-emberjs/3470)._
