我ve got a modular .NET application, which loads controllers, views and components from assemblies as plugins.
Going to learn React (totally new to it) - and got a question. Does React support splitting it
的组件分成多个程序集并在运行时加载它们吗?
答案 0 :(得分:0)
是的。
我建议您阅读React official documentation。
几乎每个React组件都会产生一些HTML标记供浏览器显示。组件拆分的一般想法是像这样在几个组件之间拆分HTML标记
// App.js
class App extends React.Component {
render () {
return <div>
My first component
<Component1/>
</div>
}
}
// Component1.js
export default class Component1 extends React.Component {
render () {
return <div>
This is internals of component
</div>
}
}