mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-23 18:19:40 +00:00
Add react tag helper. Clean up code and make it more consistent.
This commit is contained in:
@@ -12,15 +12,11 @@ namespace Microsoft.AspNet.NodeServices.React
|
||||
nodeScript = new StringAsTempFile(script); // Will be cleaned up on process exit
|
||||
}
|
||||
|
||||
public static Task<string> RenderToString(INodeServices nodeServices, string moduleName, string baseUrl) {
|
||||
return RenderToString(nodeServices, moduleName, /* exportName */ null, baseUrl);
|
||||
}
|
||||
|
||||
public static async Task<string> RenderToString(INodeServices nodeServices, string moduleName, string exportName, string baseUrl) {
|
||||
public static async Task<string> RenderToString(INodeServices nodeServices, string componentModuleName, string componentExportName, string requestUrl) {
|
||||
return await nodeServices.InvokeExport(nodeScript.FileName, "renderToString", new {
|
||||
moduleName,
|
||||
exportName,
|
||||
baseUrl
|
||||
moduleName = componentModuleName,
|
||||
exportName = componentExportName,
|
||||
requestUrl = requestUrl
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user