0

I am trying to do some server side rendering in my React app, the problem is that I use packages like vivus or react-inlinesvg and they use the window variable inside them, and all I get is the error of window is not defined. Is there any way to overcome this problem?

mdmb
  • 4,833
  • 7
  • 42
  • 90
  • I also do server side rendering and not using packages that is not compatible with node.js environment. I have my own component for rendering svgs. I don't know what vivus is but i am sure there is another package for that or you can write your own. – muratgozel May 27 '17 at 18:11
  • Vivus is used for animation of svg drawing. Going to see if there are any other libraries out there. – mdmb May 27 '17 at 18:22
  • I have used [animejs](https://github.com/juliangarnier/anime) ones. It has no problem with server side rendering as i can remember. – muratgozel May 27 '17 at 18:26
  • Did you ever figure this out? If not, could you share your code. – Mugabo Jul 08 '21 at 20:54
  • No solution – but these days plenty of libraries should support server-side rendering if you want to pursue this. If not, libraries like prerender.io can save tons of development hours. – mdmb Jul 13 '21 at 13:06

0 Answers0