Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
07e404b089
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
11 lines (10 sloc) 307 Bytes
import { ReactElement } from 'react';
import { getMarkupFromTree } from './getDataFromTree';
export function renderToStringWithData(
component: ReactElement<any>
): Promise<string> {
return getMarkupFromTree({
tree: component,
renderFunction: require('react-dom/server').renderToString
});
}