Skip to main content

PowrSection

const const PowrSection = require('@/../modules/react_components/powr_section').default;

why this pattern you ask - because we have to wrap this in a require.ensure block to ensure the /view page loads without needing any React.

  const content = ReactDOM.render(
<PowrSection
componentsList={contentConfig}
observableStore={self.observableStore}
/>,
document.querySelector('#powr-form-builder-content')
);

PowrSection takes 2 props

  • componentsList - An array of all the components that go within a section (tab in the settings panel)
  • observableStore - A data store which has the model, experiments and other things that were usually stored in the window before.