# New Component Life-Cycle Hooks

**URL:** <https://discuss.emberjs.com/t/new-component-life-cycle-hooks/8134>\
**Category:** Uncategorized\
**Created:** [June 3, 2015, 6:24pm UTC](https://discuss.emberjs.com/t/new-component-life-cycle-hooks/8134 "2015-06-03T18:24:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anschoewe](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@anschoewe](https://discuss.emberjs.com/u/anschoewe)\
**Post date:** [June 3, 2015, 6:24pm UTC](https://discuss.emberjs.com/t/new-component-life-cycle-hooks/8134/1 "2015-06-03T18:24:00Z")

</div>

I see there are a few new component [life-cycle hooks in Ember 1.13](http://emberjs.com/blog/2015/05/24/another-two-oh-status-update.html#toc_new-lifecycle-hooks). What is the correct way to ‘hook’ into these events? I can’t seem to get them called.

I’ve tried both of these forms but my log message is never outputted to the console. I’m trying to find the life-cycle event where I do a one-time initialization of my component. I’m not even sure if this is the correct event to list to.

```
export default Ember.Component.extend({
     didReceiveAttrs: function(oldAtrs, newAttrs) {
         console.log('did receive attrs');
     }
});

```

And…

```
export default Ember.Component.extend({
     didReceiveAttrs(oldAtrs, newAttrs) {
         console.log('did receive attrs');
     }
});

```

---

<div class="post-metadata">

**Author:** ![rwjblue](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/rwjblue/32/9411_2.png) [@rwjblue](https://discuss.emberjs.com/u/rwjblue)\
**Post date:** [June 3, 2015, 6:36pm UTC](https://discuss.emberjs.com/t/new-component-life-cycle-hooks/8134/2 "2015-06-03T18:36:32Z")

</div>

```javascript
App.FooBarComponent = Ember.Component.extend({
  didInitAttrs: function() {
    log('didInitAttrs');
  },
  
  didReceiveAttrs: function() {
    log('didReceiveAttrs');
  },
  
  willRender: function() {
    log('willRender');
  }
});

```

> **[JS Bin](http://emberjs.jsbin.com/rwjblue/575/edit)**
>
> A live pastebin for HTML, CSS & JavaScript and a range of processors, including SCSS, CoffeeScript, Jade and more...

---

<div class="post-metadata">

**Author:** ![anschoewe](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@anschoewe](https://discuss.emberjs.com/u/anschoewe)\
**Post date:** [June 3, 2015, 7:45pm UTC](https://discuss.emberjs.com/t/new-component-life-cycle-hooks/8134/3 "2015-06-03T19:45:50Z")

</div>

Thank you. I found the issue. Somehow my project got pointed back to Ember 1.12. Those new hooks obviously aren’t available in v1.12. I’m all good now. Thanks.

---

<div class="post-metadata">

**Author:** ![Panman8201](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/panman8201/32/17727_2.png) [@Panman8201](https://discuss.emberjs.com/u/Panman8201)\
**Post date:** [June 4, 2015, 12:48pm UTC](https://discuss.emberjs.com/t/new-component-life-cycle-hooks/8134/4 "2015-06-04T12:48:54Z")

</div>

@rwjblue Is there a writeup somewhere, or going to be a writeup about proper use of these hooks? I’m thinking of what kind of stuff should be moved from `willInsertElement` to `willRender`, etc. Perhaps things that will help with Fastboot support.
