[英]How to switch this syntax to ES6?
var ACTION_TYPES = require('../actions').ACTION_TYPES;
I tried to import {ACTION_TYPES.ACTION_TYPES} from ('../actions')
but it doesn't seem to work. 我尝试
{ACTION_TYPES.ACTION_TYPES} from ('../actions')
导入{ACTION_TYPES.ACTION_TYPES} from ('../actions')
但似乎不起作用。
How to switch to ES6 using import? 如何使用导入切换到ES6?
这应该工作:
import {ACTION_TYPES} from '../actions'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.