有什么办法可以同时托管 React 和 vanilla javascript 网页吗?

Is there any way to host both react and vanilla javascipt webpages together?

我需要托管整个网络应用程序。它主要是用 ReactJS 构建的,但我有页面的某些部分 运行 vanilla javascript。有什么方法可以托管同时使用 React 和 vanilla javascript 的 Web 应用程序吗? (我在后端使用 nodeJS,mongoDB 是数据库)

结合 React 和 vanilla js 没有问题。 您可以将 React 应用程序放在 iframe 中或将 root 元素放在 body.

中的某个位置呈现您的 React 应用程序