createComponent
The createComponent()
method is the main way to create UI components for your app or integration.
The createComponent()
method can take 4 arguments, and must be defined in the blocks
object in your app's gitbook-manifest.yaml
file.
Any component defined in the blocks
object will be available in the GitBook's quick insert menu (⌘ + /)
See the Configurations section for more info.
componentId
*
string
A unique identifier for the component in the integration.
initialState
object
An object containing the initial state of your app or integration when the page loads.
action
function
render
function
*required
Example
Last updated