コード例 #1
0
 /// <summary>
 /// Renders the specified React component.
 /// </summary>
 /// <typeparam name="T">Type of the props</typeparam>
 /// <param name="dnnHelper">DNN helper</param>
 /// <param name="componentName">Name of the component</param>
 /// <param name="props">Props to initialize the component with</param>
 /// <param name="htmlTag">HTML tag to wrap the component in. Defaults to &lt;div&gt;</param>
 /// <param name="containerId">ID to use for the container HTML tag. Defaults to an auto-generated ID</param>
 /// <param name="clientOnly">Skip rendering server-side and only output client-side initialization code. Defaults to <c>false</c></param>
 /// <param name="serverOnly">Skip rendering React specific data-attributes during server side rendering. Defaults to <c>false</c></param>
 /// <param name="containerClass">HTML class(es) to set on the container tag</param>
 /// <returns>The component's HTML</returns>
 public static IHtmlString React <T> (this DnnHelper dnnHelper, string componentName, T props, string htmlTag = null, string containerId = null, bool clientOnly = false, bool serverOnly = false, string containerClass = null)
 {
     return(DnnReact.React(componentName, props, htmlTag, containerId, clientOnly, serverOnly, containerClass));
 }