System Library Common Episerver
Search Results for

    DocFx,SystemLibrary.Common.Episerver.Properties.MessageConfig,SystemLibrary.Common.Episerver.Properties.MessageEditorDescriptor,SystemLibrary.Common.Episerver.Properties.MessageProperty,SystemLibrary.Common.Episerver.Properties.MessageController,SystemLibrary.Common.Episerver.Attributes.BoxSelectionController,SystemLibrary.Common.Episerver.Attributes.BoxSelectionFactory,SystemLibrary.Common.Episerver.Attributes.JsonEditController,SystemLibrary.Common.Episerver.Attributes.JsonEditFactory,SystemLibrary.Common.Episerver.Descriptors.HideCategoryListDescriptor,SystemLibrary.Common.Episerver.Properties.ParentLinkReferenceController,SystemLibrary.Common.Episerver.Properties.ParentLinkReferenceEditorDescriptor,SystemLibrary.Common.Episerver.Properties.ParentLinkReferenceProperty,SystemLibrary.Common.Episerver.Attributes.MultiDropdownSelectionController,SystemLibrary.Common.Episerver.Attributes.MultiDropdownSelectionFactory,SystemLibrary.Common.Episerver.Initialize.RemoveSuggestedContentTypes,SystemLibrary.Common.Episerver.Extensions.CommonEpiserverApplicationServicesOptions,SystemLibrary.Common.Episerver.Extensions.CommonEpiserverApplicationBuilderOptions,SystemLibrary.Common.Episerver.EditController,SystemLibrary.Common.Episerver.Abstract.BaseController,SystemLibrary.Common.Episerver.Abstract.BaseMultiSelectionFactory,SystemLibrary.Common.Episerver.ConnectionStringsConfig,SystemLibrary.Common.Episerver.PropertiesConfig,SystemLibrary.Common.Episerver.EditConfig,SystemLibrary.Common.Episerver.Properties.MessageConfig,SystemLibrary.Common.Episerver.FontAwesome,SystemLibrary.Common.Episerver.AppSettings.Configuration,SystemLibrary.Common.Episerver.Attributes.ParentLinkReferenceFactory,SystemLibrary.Common.Episerver.Abstract.InternalBaseController,WebApplicationInitializer
    Show / Hide Table of Contents
    NamespaceSystemLibrary.Common.Episerver.Extensions SystemLibrary.Common.Episerver.dll

    Extensions for Generic Types where T is a class

    TExtensions

    public static class TExtensions

    Inheritance
    System.Object
    TExtensions
    Examples
    Arguments
    X

    Methods

    Return 'Model' as a serer side rendered component or ready to be hydrated, or both.

    Simply call ReactDOM.Hydrate or the React 18 version of hydration.

    Throws exception if invalid combinations in arguments.

    Should not throw if it executes, if a React rendering error occurs it is logged and printed in the DOM.

    - The div rendered has a class 'sle-ssr-error' which can be used to hide it in non-dev environments

    - The div only contains the message of the erorr, not stacktrace

    Always skipped property names: CurrentPage, CurrentBlock

    Remarks
    X

    If 'Model' is of type ContentData from Optimizely CMS, then it skips the default Optimizely CMS properties, such as:

    Name, Property, Item, IsReadOnly, IsModified, ContentTypeID, ViewData, ContentLink, ParentLink, ArchiveLink, Category and more... To bypass? Create your own viewmodel

    View Source

    public static StringBuilder ReactServerSideRender<T>(this T model, object additionalProps = null, string tagName = "div", bool camelCaseProps = false, string cssClass = null, string id = null, string componentFullName = null, bool renderClientOnly = false, bool renderServerOnly = false, bool printNullValues = true) where T : class

    X
    Generic types
    Name Description
    T
    Methods arguments
    Type Name Description
    T model
    System.Object additionalProps
    System.String tagName
    System.Boolean camelCaseProps
    System.String cssClass
    System.String id
    System.String componentFullName
    System.Boolean renderClientOnly
    System.Boolean renderServerOnly
    System.Boolean printNullValues
    X
    Type Description
    System.Text.StringBuilder

    }

    • View Source
    In This Article
    Package: nuget
    Source: github
    Website: System Library Common Episerver