davidhu2000 / react-spinners

A collection of loading spinner components for react
https://www.davidhu.io/react-spinners
MIT License
3.01k stars 261 forks source link

SSR issue #522

Closed ioanlucut closed 2 years ago

ioanlucut commented 2 years ago

Hey!

Thanks a lot for this lib and for implementing the feature I've requested for a long time (in alpha now).

I have a different issue now: since we use SSR, this bit is called asap.

Can we defer it to the client-side only? Or better said, not running it on the server-side? For some reason, we did not have this issue so far.

davidhu2000 commented 2 years ago

Does the code run on server side? Mt understanding is that document does not exist server side?

I'm not 100% on how to figure out server vs client side tho

davidhu2000 commented 2 years ago

i was able to reproduce this using nextjs, is this similar to the issue you have?

Screen Shot 2022-06-04 at 5 45 31 PM
davidhu2000 commented 2 years ago

@ioanlucut can you give 0.13.0-beta.4 a try?

davidhu2000 commented 2 years ago
Screen Shot 2022-06-04 at 6 10 47 PM Screen Shot 2022-06-04 at 6 10 57 PM

tested via NextJS, with js off and on, seems like it's working

ioanlucut commented 2 years ago

Thanks a lot!