<分区>
我将在 React 中看到如下所示的导入:
import {object} from '@library/component'
@
指的是什么,这是什么类型的导入?谢谢!
<分区>
我将在 React 中看到如下所示的导入:
import {object} from '@library/component'
@
指的是什么,这是什么类型的导入?谢谢!
最佳答案
这些是 scoped packages
Scopes are a way of grouping related packages together, and also affect a few things about the way npm treats the package.
导入正在使用 specifically named import与可用于命名空间导出的默认导入相比。
关于javascript - React 导入前的 '@' 是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49562739/
相关文章:
html - 防止React-router-dom刷新页面并重置点击时输入的信息
javascript - 使用 catch 是否需要 throw
javascript - 完成后如何使用 jQuery 加载模块?
javascript - 跨域ajax POST ie7与jquery
javascript - 如何为自定义垂直 slider 设置动画 Jquery
javascript - ReactJS - ref 不适用于 connect 和 redux-form
javascript - AngularJS & Jasmine : Testing that a method on the scope was called
CSS 模块 : Best practice combining classnames?