Arv*_*nmo 5 components state reactjs redux next.js
return\n <div>\n <RadioOptions />\n <GenButton />\n <OutputPass />\n </div>\n
Run Code Online (Sandbox Code Playgroud)\n我最近在做我的业余项目,我发现我的代码存在问题。在Radiooptions\xc2\xa0中我使用了一些useState钩子,我想将该状态从Radiooptions组件传递到其父组件(passGen),然后从那里将该状态传递给Get Button组件以检查某些条件,如果没有问题,则生成密码。(我还将附上我的 GitHub 存储库,以便更好地访问我的源代码)
\nhttps://github.com/arviinmo/palora/tree/main/components/passwordgenerator
\nAym*_*dps 11
在 React 中,您无法将 props 从子级传递到父级,这只是一种方式(从父级到子级)。
您应该:
归档时间: |
|
查看次数: |
16858 次 |
最近记录: |