我有一个要求,我需要单独渲染div,以便我可以在任何地方使用它,如下所示: -
import { render} from 'react-dom';
render (
<Provider store={this.store}>
<EmployeeContainerComponent>
<DisplayEmployeeComponent
/>
</EmployeeContainerComponent>
</Provider >,
document.getElementById(headerElementId)
);
render(
<Provider store={this.store}>
<EmployeeContainerComponent>
<RameshContainerComponent/>
</EmployeeContainerComponent>
</Provider >,
document.getElementById(elementId)
);
render(
<Provider store={this.store}>
<EmployeeContainerComponent>
<SideBaarContainerComponent/>
</EmployeeContainerComponent>
</Provider >,
document.getElementById(sidebarElementId)
);
我做对了吗?上述方法是否会出现任何绩效问题?