【发布时间】:2020-06-07 21:10:04
【问题描述】:
我有一个 react 应用程序,它提供多个组件,例如 <Button> <Label>。我想在 apsx 页面中呈现这些组件。
例如。
<div>
<ReactComponent/>
</div>
我知道我们可以在 aspx 页面中使用 iframe 来渲染 react app 或 cshmtl 文件中的 @script.render。但我正在寻找另一种在 aspx 页面内呈现的方式。 我是点网新手。我使用 MS Visual Studio 创建了一个 ASP.Net Web 应用程序。任何帮助都会非常有帮助..
获得了这个 github 链接。 enter link description here 现在我想了解如何添加多个 React 组件,webpack、babel、package.json 等。
【问题讨论】:
-
您不能直接在 ASP.net 网页中使用 React 组件。检查反应门户reactjs.org/docs/portals.html
标签: javascript c# asp.net .net reactjs