我将引导主题转移到WordPress,并试图在functions.php中添加JavaScript文件,并且执行显示没有错误:
但没有任何效果。
js文件在这里:js文件
我的dev控制台输出是:
TypeError: $ is undefined carousel.js:3:6079 http://localhost/wordpress/wp-content/themes/bootgotya/js/carousel.js?ver=1:3
TypeError: $ is not a function flexslider.js:14:2 http://localhost/w
我正面临着这个问题,我试图将它转换成一个函数,但states并没有像我预期的那样工作。我怎么才能解决这个问题呢?我想在切换路由时创建一个加载效果,而不会导致这样的问题: react-dom.development.js?ac89:67 Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and
因此,我想要做的是从后端获得一个Array,它是从fs读取我的服务器上的一个文件夹,返回一个数组,其中包含图片的名称。
使用此Array,我希望通过它来映射,并为每一张图片创建一个图片组件。
控制台中有两个主要错误:
第一:
Uncaught Error: Objects are not valid as a React child (found: [object Promise]). If you meant to render a collection of children, use an array instead.
at throwOnInvalidObjectType (r