📄
BoltUI Docs (Preview)
  • Getting Started
    • Introduction
    • Installing Bolt
    • Hello World
  • Understanding Bolt
    • Creating UI
    • Components
    • Properties & Events
    • Styles
    • Custom Components
    • Reactivity
    • Component Lifecycle
    • Routing
  • API Reference
    • index
      • State
      • Component
      • render
      • attribute
      • event
      • onLoad
      • onRemove
      • id
      • Class
      • When
    • components
      • Link
      • AppLink
      • GenericElement
    • events
      • onGenericEvent
    • boltrouter
      • Router
      • AppRouter
      • Url
      • Navigate
      • AppNavigator
  • Future
    • Server Side Rendering
    • Multi-Platform
Powered by GitBook
On this page
  • Definition
  • Input
  • Returns HTMLELement
  1. API Reference
  2. index

Component

PreviousStateNextrender

Last updated 2 years ago

Definition

function Component(callback: function, ...states: State) {
    return HTMLElement
}

Input

  • callback : functional component or a callback component to render when state is changed

  • states[] : array of state objects returned from function to which the component will bind to

Returns HTMLELement

The HTMLElement will be returned from the callback, after being wrapped under a div element

State()