React Hooks, variable reinitialized on rerender

前端 未结 0 1104
谎友^
谎友^ 2021-01-31 16:23

I am trying to keep data of a non-usestate variable on a rerender

I have a main component, which has a sub-component.

The sub-component contain a state and return

相关标签:
回答
  • 消灭零回复
提交回复
热议问题