Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道ReactJSforceUpdate()和forceReload()in ReactJS 有什么区别。
forceUpdate()
forceReload()
试图找到一些关于此的文档,但找不到一些关于forceReload()-
提前致谢!
不确定你在哪里看到的,但forceReload它不是 React 的一部分。您可能找不到文档,因为没有任何文档——如果我"forceReload" react现在搜索,首先会出现这个问题。
forceReload
"forceReload" react
如果你想让一个组件重新渲染而不改变它的状态或道具,你应该调用forceUpdate.
forceUpdate