Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

What does @ mean while importing libraries in JavaScript? import '@library-name'

For example:
import { createDrawerNavigator } from '@react-navigation/drawer';

What is the significance of the ‘@’?

I tried looking it up but the answers explained its usage as a pointer to the root directory. (as explained here.)

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

NPM packages are sometimes published under a "scope".

When used in package names, scopes are prefixed with @. So drawer in the react-navigation scope is published as @react-navigation/drawer.

See https://docs.npmjs.com/cli/using-npm/scope for more information.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading