withSlots(Template) ⇒ React.Component

Wraps template component with Templated component.

Returns: React.Component - templated component (wrapped with Templated) Params

  • Template React.Component - template component

Description

To inject content into template component with slots we need to wrap it with Templated component. Since we need to perform wrapping for every template component, withSlots() HoC was introduced. To achieve same effect as here just do the thing below:

import { withSlots } from 'react-templated';
import PageTemplate from './PageTemplate.js';

export default withSlots(PageTemplate);

results matching ""

    No results matching ""