Property | Type | Description | |
---|---|---|---|
_configuration | IReactSiteConfiguration | ||
_environment | IReactEnvironment | ||
_props | object | ||
_serializedProps | string |
Method | Description | |
---|---|---|
ReactComponent ( IReactEnvironment environment, IReactSiteConfiguration configuration, string componentName, string containerId ) : System |
Initializes a new instance of the ReactComponent class.
|
|
RenderHtml ( bool renderContainerOnly = false, bool renderServerOnly = false ) : string |
Renders the HTML for this component. This will execute the component server-side and return the rendered HTML.
|
|
RenderJavaScript ( ) : string |
Renders the JavaScript required to initialise this component client-side. This will initialise the React component, which includes attach event handlers to the server-rendered HTML.
|
Method | Description | |
---|---|---|
EnsureComponentExists ( ) : void |
Ensures that this component exists in global scope
|
|
GetComponentInitialiser ( ) : string |
Gets the JavaScript code to initialise the component
|
Method | Description | |
---|---|---|
EnsureComponentNameValid ( string componentName ) : void |
Validates that the specified component name is valid
|
|
GenerateId ( ) : string |
Generates a unique identifier for this component, if one was not passed in.
|
protected GetComponentInitialiser ( ) : string | ||
return | string |
public ReactComponent ( IReactEnvironment environment, IReactSiteConfiguration configuration, string componentName, string containerId ) : System | ||
environment | IReactEnvironment | The environment. |
configuration | IReactSiteConfiguration | Site-wide configuration. |
componentName | string | Name of the component. |
containerId | string | The ID of the container DIV for this component |
return | System |
public RenderHtml ( bool renderContainerOnly = false, bool renderServerOnly = false ) : string | ||
renderContainerOnly | bool | Only renders component container. Used for client-side only rendering. |
renderServerOnly | bool | Only renders the common HTML mark up and not any React specific data attributes. Used for server-side only rendering. |
return | string |
protected IReactSiteConfiguration _configuration | ||
return | IReactSiteConfiguration |
protected IReactEnvironment _environment | ||
return | IReactEnvironment |