Uncaught ReferenceError: ReactDOM is not defined at Object

Symptoms

When we update the Mobile Web Capture, we receive an error message:

web-capture.js:24570 Uncaught ReferenceError: ReactDOM is not defined at Object. (:3000/libs/abbyy-mwc…apture.js:13:113183) at n (:3000/libs/abbyy-mwc…eb-capture.js:5:113) at Module. (:3000/libs/abbyy-mwc…capture.js:24:15366) at n (:3000/libs/abbyy-mwc…eb-capture.js:5:113) at Object. (:3000/libs/abbyy-mwc…-capture.js:24:6897) at n (:3000/libs/abbyy-mwc…eb-capture.js:5:113) at :3000/libs/abbyy-mwc…eb-capture.js:5:905 at :3000/libs/abbyy-mwc…eb-capture.js:5:916

Cause

Due to the fact that it is difficult for the application to understand which React to use - the one that is global or the one that is in the application.

Resolution

Please import separately from React createContext, for example: import {createContext} from 'react'
 
Another way, you can expand the webpack config (via CRACO for example) to use the global one everywhere. This is exactly the option with externals. More information you can find here.

Was this article helpful?

0 out of 1 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.