We're a place where coders share, stay up-to-date and grow their careers.
I'm not sure initializing useRef with null will work. You may get a compilation error.
Object is possibly 'null'. TS2531
May have to do some kind of null check or something, but the theory is sound. Thanks for sharing.
I'm not sure initializing useRef with null will work. You may get a compilation error.
Object is possibly 'null'. TS2531
May have to do some kind of null check or something, but the theory is sound. Thanks for sharing.