It should be noted that toRefProxy and fromRefProxy are probably overkill, because they only make a difference if either the headers row or the torrent-table-rows container are re-mounted independently of each other, which I don't think could ever happen here. But it doesn't hurt to have this, as it makes makes the implementation a bit more future proof.
The idea is that if e.g. the <Box> component was unmounted and re-mounted, it wouldn't receive the initial translate styles. This can be simulated by providing a key to the <Box> component; whenever the key changes, the old Box is destroyed, and a new one is mounted in its place, triggering the callback ref.
toRefProxy
andfromRefProxy
are probably overkill, because they only make a difference if either the headers row or thetorrent-table-rows
container are re-mounted independently of each other, which I don't think could ever happen here. But it doesn't hurt to have this, as it makes makes the implementation a bit more future proof. The idea is that if e.g. the<Box>
component was unmounted and re-mounted, it wouldn't receive the initialtranslate
styles. This can be simulated by providing akey
to the<Box>
component; whenever the key changes, the old Box is destroyed, and a new one is mounted in its place, triggering the callback ref.