Reputation: 2510
So I have noticed that I can use Meteor methods anywhere in my project even without importing it explicitly.
My question now is twofold:
Upvotes: 1
Views: 640
Reputation: 1195
When 1.3 version was released, the biggest new feature was ES6 modules.
import { Meteor } from 'meteor/meteor'
import { EJSON } from 'meteor/ejson'
Although you can use this feature(and you should), Meteor is still backwards compatible and bind some packages to the global variable. This is the reason why it works for you at the moment. You should NOT use it without importing. The main risk are future updates. At some point, the new version of Meteor won't be compatible with older applications. If you won't have imported packages, you will need to do some unnecessary extra work. Otherwise, your application won't work.
If you want to read more about this topic I found some interesting links:
Upvotes: 4