本文整理汇总了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)
}
开发者ID:carlosrfernandez,项目名称:ReactiveTraderCloud,代码行数:8,代码来源:browserPopoutService.ts
示例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);
}
开发者ID:,项目名称:,代码行数:8,代码来源:
示例3: main
export function main() {
ReactDOM.render(
React.createElement(Component),
document.getElementById('root')
);
console.log('Hello, world!');
}
开发者ID:afrolovskiy,项目名称:frontend-infra,代码行数:8,代码来源:index.ts
示例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];
}
开发者ID:breezeflow,项目名称:breezeflow,代码行数:8,代码来源:test-util.ts
示例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);
}
开发者ID:saneyuki,项目名称:karen,代码行数:8,代码来源:MessageContentView.ts
示例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');
开发者ID:boneill42,项目名称:pivot,代码行数:8,代码来源:pivot-entry.ts
示例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);
}
开发者ID:gurleen23,项目名称:spfxWeather,代码行数:8,代码来源:WeatherWebPart.ts
示例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]);
}
开发者ID:syesildag,项目名称:jreact,代码行数:8,代码来源:jreactWrapper.ts
示例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);
}
}
开发者ID:andrewtpoe,项目名称:ag-grid-react,代码行数:8,代码来源:ReactFilterFactory.ts
示例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);
}, () => { }, () => {
开发者ID:saneyuki,项目名称:karen,代码行数:8,代码来源:ConnectSettingContext.ts
注:本文中的react-dom.render函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论