What does 'export default' do in ember?

After some googling, I understand ‘export default’ is some new syntax in ES6, but what does it exactly do in the ember world? It’s being used extensively in ember.

You might want to have a look at http://jsmodules.io/ :wink:

1 Like

Should I understand it as the following: each .js file (no matter it’s a controller or a route) in ember should contain a primary function?

For the most part, for things like routes, controllers, etc. although it’s probably easier to consider them as objects. But often utilities will export more than one “thing”. You might think of the export/import paradigm as making things “pluggable” while maintaining a separation of concerns.