setState can be a callback ref. If you want setting ref to trigger a rerender, you can just pass setState updater as a ref prop. This code will ...
確定! 回上一頁