本文整理汇总了TypeScript中react-dom.render函数的典型用法代码示例。如果您正苦于以下问题:TypeScript render函数的具体用法?TypeScript render怎么用?TypeScript render使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了render函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
const onloadHandler = () => {
log.debug(`Popout window loading`)
childWindow.document.title = options.title
popoutContainer = childWindow.document.createElement('div')
popoutContainer.id = this.popoutContainerId
childWindow.document.body.appendChild(popoutContainer)
ReactDOM.render(view, popoutContainer)
}
示例2: render
public render(): void {
const element: React.ReactElement<ITrendingInThisSiteProps> = React.createElement(TrendingInThisSite, {
numberOfDocuments: this.properties.numberOfDocuments,
siteUrl: this.context.pageContext.web.absoluteUrl
});
ReactDom.render(element, this.domElement);
}
示例3: main
export function main() {
ReactDOM.render(
React.createElement(Component),
document.getElementById('root')
);
console.log('Hello, world!');
}
示例4: loadCssInHeader
export function loadTemplate<T extends Element>(element: any, style?: string): [any, HTMLDivElement] {
if (style === 'editor') {
loadCssInHeader();
}
_lastTemplateDiv = document.createElement('div');
document.body.appendChild(_lastTemplateDiv);
return [ReactDOM.render(element, _lastTemplateDiv), _lastTemplateDiv];
}
示例5: _updateUserList
private _updateUserList(list: Array<User>): void {
const view = React.createElement(UserList, {
list: list,
channelId: this._channelId,
action: this._msgAction,
});
ReactDOM.render(view, this._userElement);
}
示例6: require
], (require) => {
var NoDataSourcesApplication = require('./components/no-data-sources-application/no-data-sources-application').NoDataSourcesApplication;
ReactDOM.render(
React.createElement(NoDataSourcesApplication, {}),
container
);
}, 'no-data-sources');
示例7: render
public render(): void {
const element: React.ReactElement<IWeatherProps> = React.createElement(Weather, {
basicHttpClient: this.context.basicHttpClient,
location: this.properties.location
});
ReactDom.render(element, this.domElement);
}
示例8: renderElement
renderElement() {
let clone = React.createElement(
this.props.element.type,
Utils.extend(this.props.element.props, {ref: this.reactInstance}),
this.props.element.props.children
);
ReactDOM.render(clone, this.getElement()[0]);
}
示例9: init
public init(params: any) {
this.eGui = document.createElement('div');
this.backingInstance = ReactDOM.render(React.createElement(reactComponent, { params: params }), this.eGui);
if (typeof this.backingInstance.init === 'function') {
this.backingInstance.init(params);
}
}
示例10:
const observer: Rx.Subscriber<ConnectionValue> = Rx.Subscriber.create((data: ConnectionValue) => {
const view = React.createElement(ConnectSettingWindow, {
viewmodel: this._store.viewmodel(),
action: this._action,
data: data,
});
ReactDOM.render(view, mountpoint);
}, () => { }, () => {