我有一个redux State HOC来管理连接 当我向商店添加新帖子时,我遇到问题 import React, { useEffect } from "react";
import { connect } from "react-redux";
export default function withState(WrappedComponent) {
function mapStateToProps(reduxState) {
let state = {};
for(let t of Object.entries(reduxState)
出于某些原因,我的博客文章创建了自己的URL。
博客是在www.website.com/blog/上,但当我发布新帖子时,新的帖子URL是www.website.com/new-post-url/。
我想要的是博客帖子的网址是www.website.com/blog/new-post-url/作为他们的网址。
我使用All in One SEO作为我的SEO插件(如果这很重要)。
当我在我的应用程序上使用钩子时,我得到了的错误:无效的钩子调用。我不知道为什么要得到这个错误,因为我认为它是在函数组件中调用的?
Server Error
Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as R