获得徽章 6
- H5前端React项目运行报错: _interopRequireDefault is not a function
报在底层webpack里,
大佬们有遇到的吗,求解答,在线等!!!!![[流泪]](//lf-web-assets.juejin.cn/obj/juejin-web/xitu_juejin_web/img/jj_emoji_6.dde0d83.png)
react-libs-316da96e.js:formatted:861 Uncaught TypeError: _interopRequireDefault is not a function
at Object.../../react-dom/cjs/react-dom.development.js (react-libs-316da96e.js:formatted:861)
at __webpack_require__ (bootstrap:848)
at fn (bootstrap:150)
at Object.../../react-dom/index.js (react-libs-316da96e.js:formatted:17952)
at __webpack_require__ (bootstrap:848)
at fn (bootstrap:150)
at Object.../../../index.tsx (index.tsx:2)
at __webpack_require__ (bootstrap:848)
at fn (bootstrap:150)
at Object.0 (app-316da96e.js:3024)展开10点赞 - Compose的出现,可能是H5前端学习AndroidNative的好时机。
全新的语言,类似H5开发,没有历史包袱。评论点赞 - 各路大神!!
下面代码中,onSecondClick里的value取不到更新后的值,是什么原因啊?
困惑好多天了
const [value,setValue] = useState(0);
//先执行
const onFirstClick = useCallback((e) => {
setValue(100)
}, [setValue])
//后执行
const onSecondClick = useCallback((e) => {
console.log(value);//0
}, [value])展开赞过191
![[流泪]](http://lf-web-assets.juejin.cn/obj/juejin-web/xitu_juejin_web/img/jj_emoji_6.dde0d83.png)