You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
执行build后
TypeError: Cannot read property 'useContext' of null
at define.push.../../node_modules/react/cjs/react.production.min.js.exports.useContext (vendors.js?t=wechat&s=1718764236515&v=3ba68365142b07947f0be04c33d77cf3:37)
at SWRConfig (vendors.js?t=wechat&s=1718764236515&v=3ba68365142b07947f0be04c33d77cf3:635)
相关平台
微信小程序
小程序基础库: 3.4.7
使用框架: React
复现步骤
随意找个组件使用 useSWR 或者 SWRConfig 就行。
<SWRConfig
// https://swr.bootcss.com/docs/api
value={{ revalidateOnFocus: false }}
>
期望结果
执行build 后正常
实际结果
执行build后
TypeError: Cannot read property 'useContext' of null
at define.push.../../node_modules/react/cjs/react.production.min.js.exports.useContext (vendors.js?t=wechat&s=1718764236515&v=3ba68365142b07947f0be04c33d77cf3:37)
at SWRConfig (vendors.js?t=wechat&s=1718764236515&v=3ba68365142b07947f0be04c33d77cf3:635)
环境信息
The text was updated successfully, but these errors were encountered: