I'll see imports in React that look like:
import {object} from '@library/component'
What is the @
referring to and what kind of import is this? Thanks!
I'll see imports in React that look like:
import {object} from '@library/component'
What is the @
referring to and what kind of import is this? Thanks!
These are scoped packages
Scopes are a way of grouping related packages together, and also affect a few things about the way npm treats the package.
The import is using a specifically named import vs the default import which can be used to namespace exports.
It's just not limited to React only but it's a part of npm and many other framework also use it (Angular etc). In addition to what Lance mentioned here are some advantages of it.