Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

emberjs : What does the ...arguments in this._super(...arguments) signify?

Tags:

ember.js

I have just started using ember js and I tripped over this function a lot of times Could someone brief about the use of this._super() and also explain the importance of ...arguments Thanks

like image 205
aka_julie Avatar asked Dec 19 '22 04:12

aka_julie


1 Answers

You need this, whenever you are overriding classes/functions (e.g. didReceiveAttrs in a component). It makes sure, that important functions of your parent are called that you might not be aware of. The ...arguments parameter is a basic javascript approach to encapsulate a number of (optional) parameters that the super function might need...

like image 66
Remi Smirra Avatar answered May 19 '23 20:05

Remi Smirra