0

I'm a beginner in React and stuck with some problem. I got an error Browser history needs a DOM, I'm using Server side rendering. I have visited many websites but still not got any exact answer that what does it does it mean and why it occurs ?

Abhijeet
  • 248
  • 1
  • 2
  • 12
  • 2
    Does this answer your question? [react-router 4 - Browser history needs a DOM](https://stackoverflow.com/questions/43058684/react-router-4-browser-history-needs-a-dom) – Józef Podlecki May 24 '20 at 10:34
  • @JózefPodlecki I have read that but can't able to understand why Server don't have real DOM and why we use history provider ? – Abhijeet May 24 '20 at 11:17
  • `DOM` comes with the rendered web page. That's why you can access `document` object and use all of its api when running on client. On the server side however you don't have that. The same goes with History api – Józef Podlecki May 24 '20 at 11:51

0 Answers0