Function
| Static Public Summary | ||
| public |
renderContents(contents: Object): ReactElement | string Consumes a peritext content's pseudo-dom nodes list to produce react markup |
|
| public |
resolveDataDependencies(inputSections: array, assetsController: Object, assetsParams: Object, resolveData: boolean, callback: function(err: error, finalSections: array)) Resolves interpolations ni metadata, resources, and contextualizations, and possibly fetches stores necessary data for rendering |
|
Static Public
public renderContents(contents: Object): ReactElement | string source
import renderContents from 'peritext/src/core/utils/componentsFactory/index.js'Consumes a peritext content's pseudo-dom nodes list to produce react markup
Params:
| Name | Type | Attribute | Description |
| contents | Object | the pseudo-dom nodes array |
public resolveDataDependencies(inputSections: array, assetsController: Object, assetsParams: Object, resolveData: boolean, callback: function(err: error, finalSections: array)) source
import resolveDataDependencies from 'peritext/src/core/resolvers/resolveDataDependencies/index.js'Resolves interpolations ni metadata, resources, and contextualizations, and possibly fetches stores necessary data for rendering
Params:
| Name | Type | Attribute | Description |
| inputSections | array | the sections to resolve |
|
| assetsController | Object | the assets controller module to use to communicate with assets |
|
| assetsParams | Object | the params to use for accessing the assets |
|
| resolveData | boolean | whether to fetch and store necessary data right away or to store methods for later lazy-loading |
|
| callback | function(err: error, finalSections: array) | callbacks a possible errors and the updated list of sections |