我正在尝试使用 useSelector 和 useDispatch 来更改 bulma 模型的状态
\n像这样
const isState = useSelector((state) => state.isActiveState)\nRun Code Online (Sandbox Code Playgroud)\nModel.js 是:
\nimport React from \'react\'\nimport "../CSS/Careers.css"\nimport { useSelector, useDispatch } from \'react-redux\';\nimport { stateCheck } from \'../Redux/ActiveState\'\n\nexport default function Modal() {\n\n const isState = useSelector((state) => state.isActiveState)\n \n \n\n const dispatch = useDispatch()\n\n \n return (\n <div>\n <div\n style={{ padding: "0rem 0.5rem 0rem" }}\n className={`modal ${isState}`} //this should change the state to \'is-active\'\n >\n <div onClick={() => dispatch(stateCheck())} className="modal-background"></div>\n <div style={{ borderRadius: …Run Code Online (Sandbox Code Playgroud)