jsonx
    Preparing search index...

    Variable jsonxHTMLStringConst

    jsonxHTMLString: (this: OutputHTMLContext, config?: OutputHTMLConfig) => string = outputHTML

    Type Declaration

      • (this: OutputHTMLContext, config?: OutputHTMLConfig): string
      • Use ReactDOMServer.renderToString to render html from JSONX

        Parameters

        • this: OutputHTMLContext

          options for getReactElementFromJSONX

        • config: OutputHTMLConfig = ...

          options used to inject html via ReactDOM.render

          • jsonx

            any valid JSONX JSON object

          • resources

            any additional resource used for asynchronous properties

        Returns string

        React genereated html via JSONX JSON

        // Uses react to create <div class="jsonx-generated"><p style="color:red;">hello world</p></div>
        jsonx.outputHTML({ jsonx: { component: 'div', props:{className:'jsonx-generated',children:[{ component:'p',props:{style:{color:'red'}}, children:'hello world' }]}}, });