Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- renderComponent: function(component, history, dynamicallyLoaded) {
- if (component == null) return <React.Fragment/>;
- if (Array.isArray(component)) {
- return component.map(x => this.renderComponent(x, history));
- }
- var existingComponent = this.components.find(x => x.type === component.type);
- if (existingComponent != null) {
- return React.createElement(existingComponent.component, {
- ...component,
- key: component.id,
- history
- });
- } else if (component.isPlugin && !dynamicallyLoaded) {
- return <LazyElement component={component} key={component.id} history={history}/>
- }
- return internalRenderComponent(component, history);
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement