Smart Builder SDK comes with a few built-in export methods that we can use to export the following:

You’ll notice that in each sample code, there is a comment specifying the name of the file; these are files that have been exported from one file called index.ts, which we've referenced in the manifest file

💡 Need a refresher of the manifest file? See Required Packages).

Available methods

An App requires registering up to 4 different parts so that it works seamlessly with the Smart Builder. The name of each method will describe the part of your App for which it is responsible. Your App’s entry file index.ts can look like the following:

IMPORTANT: Note that ordering is critical here, so please be mindful of this.

import { registerControl, registerComponent, registerSection, registerHook } from 'ub-shared';
import { Hook } from './my-hook';
import { Template } from './my-section';
import { Component } from './my-component';
import { Control } from './my-control';

// The order is important!
registerHook(Hook);
registerControl(Control);
registerComponent(Component); // Required
registerSection(Template);

To get the developer up and running quickly, this page will go over the the files in order of importance rather than the order specified above. A Hello World example will be used to represent code examples. Please reach out to Unbounce Apps Team for the sample repository.

Components

Component Configuration

Your component configuration is the most important for the App to be registered and have it available in the Smart Builder. The component configuration is an object with specifications so that it can be registered correctly into the Smart Builder: