You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to fork the project an replace const containerRef = useRef<HTMLDivElement>(document.createElement('div'));
with const containerRef = useRef<HTMLDivElement>(null);
and add null-checks whenever containerRef.current is used, but my experience with typescript is limited and I didn't want to make a mess! 😀
The text was updated successfully, but these errors were encountered:
Hello, and thank you for your work on this component!
I get a "document is not defined" error on the server when I am using server side rendering.
It looks like the problem is here:
react-compare-slider/src/react-compare-slider.tsx
Line 143 in 0729b0b
I tried to fork the project an replace
const containerRef = useRef<HTMLDivElement>(document.createElement('div'));
with
const containerRef = useRef<HTMLDivElement>(null);
and add null-checks whenever
containerRef.current
is used, but my experience with typescript is limited and I didn't want to make a mess! 😀The text was updated successfully, but these errors were encountered: