React功能组件动态数量USEREF
我的功能组件只有在运行时间我知道需要多少个USEREF。 在这种情况下,运行时间意味着取决于某些参数的内部使用效率,直到我才知道需要多少useref ... 当然,USEREF / Createref不能用于使用效率。
我看到的示例是关于最初渲染的组件时在参考文献中定义数组。
我能做些什么?
I have functional component that only in run time I know how many useRef needed.
run time, in this case, means inside useEffect that depends on some parameters and only then I know how many useRef needed...
Of course, useRef / createRef can't be used in useEffect.
Examples I saw are about defining array in ref.current when component initially rendered.
What can I do?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论