Dispatcher::getReactComponent PHP Method

getReactComponent() public method

Usage: $getReactComponent(YourComponent);
public getReactComponent ( string $name ) : string
$name string Used to name the DOM elements and obtain the initial model.
return string A snippet good for adding to a SS template.
    public function getReactComponent($name)
    {
        $model = $this->getModel($name);
        $model['InitialSecurityID'] = $this->getSecurityToken()->getValue();
        return $this->customise(['Name' => $name, 'Model' => htmlentities(json_encode($model))])->renderWith('ReactTemplate');
    }