react useref current not updating