React, Uncaught ReferenceError: ReactDOM is not defined

前端 未结 6 857
渐次进展
渐次进展 2021-02-07 02:39

I am doing this Router tutorial.

My App.jsx file:

import React from \'react\';
import ReactDOM from \'react-dom\';
import { Router, Route, Link, browserH         


        
6条回答
  •  太阳男子
    2021-02-07 03:11

    I just have a simple solution for it!

    in my case the problem was with ReactDom namespace. just change it to something else and it work!

    import XReactDom from 'react-dom'
    

提交回复
热议问题