## Index

### References

- __express
- renderFile

### Variables

- DynamicComponent
- _jsonxChildren
- _jsonxComponents
- _jsonxProps
- _jsonxUtils
- componentMap
- createElement
- displayComponent
- getBoundedComponents
- getComponentFromMap
- getComputedProps
- getJSONXChildren
- getReactElement
- getRenderedJSON
- jsonxHTMLString
- renderIndex

### Functions

- __getReact
- __getReactDOM
- compile
- getReactElementFromJSON
- getReactElementFromJSONX
- jsonToJSX
- jsonxRender
- outputHTML
- outputJSON
- outputJSX

### Object literals

- _jsonxHelpers

## References

### __express

Re-exports __express

### renderFile

Renames and re-exports __express

## Variables

### DynamicComponent

DynamicComponent: DynamicComponent

- Defined in index.ts:21

### Const _jsonxChildren

_jsonxChildren: "children" = jsonxChildren

- Defined in index.ts:323

### Const _jsonxComponents

_jsonxComponents: "components" = jsonxComponents

- Defined in index.ts:324

### Const _jsonxProps

_jsonxProps: "props" = jsonxProps

- Defined in index.ts:325

### Const _jsonxUtils

_jsonxUtils: "utils" = jsonxUtils

- Defined in index.ts:326

### componentMap

componentMap: any

- Defined in index.ts:18

### Const createElement

createElement: createElement = React.createElement

- Defined in index.ts:16

### displayComponent

displayComponent: displayComponent

- Defined in index.ts:25

### getBoundedComponents

getBoundedComponents: getBoundedComponents

- Defined in index.ts:20

### getComponentFromMap

getComponentFromMap: getComponentFromMap

- Defined in index.ts:19

### getComputedProps

getComputedProps: getComputedProps

- Defined in index.ts:23

### getJSONXChildren

getJSONXChildren: getJSONXChildren

- Defined in index.ts:24

### Const getReactElement

getReactElement: getReactElementFromJSONX = getReactElementFromJSONX

- Defined in index.ts:191

### Const getRenderedJSON

getRenderedJSON: getReactElementFromJSONX = getReactElementFromJSONX

- Defined in index.ts:190

### Const jsonxHTMLString

jsonxHTMLString: outputHTML = outputHTML

- Defined in index.ts:277

### Let renderIndex

renderIndex: number = 0

- Defined in index.ts:26

## Functions

### __getReact

- __getReact(): React

- - Defined in index.ts:311

  Exposes react module used in JSONX

  #### Returns React

  React

### __getReactDOM

- __getReactDOM(): "/Users/yaw.etse/Developer/other/repetere/jsonx/node_modules/@types/react-dom/index"

- - Defined in index.ts:319

  Exposes react dom module used in JSONX

  #### Returns "/Users/yaw.etse/Developer/other/repetere/jsonx/node_modules/@types/react-dom/index"

  ReactDOM

### compile

- compile(this: Context, jsonx: jsonx, resources?: {}): compiledJSONX

- - Defined in index.ts:222

  converts a jsonx json object into a react function component

  example

    jsonx.compile({jsonx:{component:'div',props:{title:'some title attribute'},children:'inner html text'}}) //=>React Function Component

  #### Parameters

  - ##### this: Context

  - ##### jsonx: jsonx

    valid JSONX JSON

  - ##### Default value resources: {} = {}

    props for react element

  #### Returns compiledJSONX

  React element via React.createElement

### getReactElementFromJSON

- getReactElementFromJSON(__namedParameters: { children: any; props: any; type: string }): ReactElementLike

- - Defined in index.ts:201

  converts a json object {type,props,children} into a react element

  example

    jsonx.getReactElementFromJSON({type:'div',props:{title:'some title attribute'},children:'inner html text'})

  #### Parameters

  - ##### __namedParameters: { children: any; props: any; type: string }

    - ##### children: any

    - ##### props: any

    - ##### type: string

  #### Returns ReactElementLike

  React element via React.createElement

### getReactElementFromJSONX

- getReactElementFromJSONX(this: Context, jsonx?: jsonx | simpleJsonx, resources?: {}): ReactElementLike | JSONReactElement | null | undefined

- - Defined in index.ts:103

  Use React.createElement and JSONX JSON to create React elements

  example

    // Uses react to create the equivalent JSX hello world jsonx.getReactElementFromJSONX({component:'myCompnent',props:{style:{color:'blue'}},children:'hello world'})

  property

    {object} this - options for getReactElementFromJSONX

  property

    {Object} [this.componentLibraries] - react components to render with JSONX

  property

    {boolean} [this.debug=false] - use debug messages

  property

    {boolean} [this.returnJSON=false] - return json object of {type,props,children} instead of react element

  property

    {boolean} [this.disableRenderIndexKey=false] - disables auto assign a key prop

  property

    {function} [this.logError=console.error] - error logging function

  property

    {string[]} [this.boundedComponents=[]] - list of components that require a bound this context (usefult for redux router)

  #### Parameters

  - ##### this: Context

  - ##### Optional jsonx: jsonx | simpleJsonx

    any valid JSONX JSON object

  - ##### Default value resources: {} = {}

    any additional resource used for asynchronous properties

  #### Returns ReactElementLike | JSONReactElement | null | undefined

  React element via React.createElement

### jsonToJSX

- jsonToJSX(json: JSONReactElement): string

- - Defined in index.ts:286

  converts JSONX JSON IR to JSX

  example

    jsonx.jsonToJSX({ type: 'div', props: { key: 5, title: 'test' }, children: 'hello' }) // => '

    hello
    '

  #### Parameters

  - ##### json: JSONReactElement

    {type,props,children}

  #### Returns string

  jsx string

### jsonxRender

- jsonxRender(this: Context, config?: defs.RenderConfig): void

- - Defined in index.ts:39

  Use JSONX without any configuration to render JSONX JSON to HTML and insert JSONX into querySelector using ReactDOM.render

  example

    // Uses react to create

    hello world

    jsonx.jsonxRender({ jsonx: { component: 'div', props:{className:'jsonx-generated',children:[{ component:'p',props:{style:{color:'red'}}, children:'hello world' }]}}, querySelector:'#myApp', });

  property

    {object} this - options for getReactElementFromJSONX

  #### Parameters

  - ##### this: Context

  - ##### Default value config: defs.RenderConfig = { jsonx: { component: "" }, querySelector: "" }

    options used to inject html via ReactDOM.render

  #### Returns void

### outputHTML

- outputHTML(this: defs.OutputHTMLContext, config?: defs.OutputHTMLConfig): string

- - Defined in index.ts:68

  Use ReactDOMServer.renderToString to render html from JSONX

  example

    // Uses react to create

    hello world

    jsonx.outputHTML({ jsonx: { component: 'div', props:{className:'jsonx-generated',children:[{ component:'p',props:{style:{color:'red'}}, children:'hello world' }]}}, });
  property

    {object} this - options for getReactElementFromJSONX

  #### Parameters

  - ##### this: defs.OutputHTMLContext

  - ##### Default value config: defs.OutputHTMLConfig = { jsonx: { component: "" } }

    options used to inject html via ReactDOM.render

  #### Returns string

  React genereated html via JSONX JSON

### outputJSON

- outputJSON(jsonx: jsonx, resources?: {}): JSONReactElement

- - Defined in index.ts:265

  Compiles JSONX into JSON IR format for react create element

  example

    jsonx.outputJSON({ component: 'div', props: { title: 'test', }, children: 'hello', }); //=> { type: 'div', props: { key: 5, title: 'test' }, children: 'hello' }

  property

    {object} this - options for getReactElementFromJSONX

  #### Parameters

  - ##### jsonx: jsonx

    any valid JSONX JSON object

  - ##### Default value resources: {} = {}

    any additional resource used for asynchronous properties

  #### Returns JSONReactElement

  json - {type,props,children}

### outputJSX

- outputJSX(this: Context, jsonx: jsonx, resources?: {}): string

- - Defined in index.ts:244

  converts JSONX JSON IR to JSX

  example

    jsonx.jsonToJSX({ type: 'div', props: { key: 5, title: 'test' }, children: 'hello' }) // => '

    hello
    '

  #### Parameters

  - ##### this: Context

  - ##### jsonx: jsonx

  - ##### Default value resources: {} = {}

  #### Returns string

  jsx string

## Object literals

### Const _jsonxHelpers

_jsonxHelpers: object

- Defined in index.ts:327

### luxon

luxon: "/Users/yaw.etse/Developer/other/repetere/jsonx/node_modules/@types/luxon/index"

- Defined in index.ts:327

### numeral

numeral: Numeral

- Defined in index.ts:327