Productivity
Eliminate boilerplate needed in traditional LWC developement. Get straight to the point and ship features faster.
Productivity
Eliminate boilerplate needed in traditional LWC developement. Get straight to the point and ship features faster.
Consistency
Consistent and opinionated APIs across all your project. Hassle free collaboration between team members.
Reusability
Build reusable pieces across multiple components by embracing the mixin pattern.
import { BoltElement, mix, useDataBinding, useForm} from 'c/boltage';import { IT_SUPPORT_FIELDS, BILLING_FIELDS, GENERAL_FIELDS} from './formFields.js';export default class myLWC extends mix( BoltElement, useDataBinding, useForm({ fields: self => self.caseFields, objectApiName: 'Case' })) { @track caseType; get caseTypes() { return ['IT_SUPPORT', 'BILLING','GENERAL'] .map(type => ({ label: type, value: type })); } get caseFields() { switch(this.caseType) { case 'IT_SUPPORT': return IT_SUPPORT_FIELDS; case 'BILLING': return BILLING_FIELDS; case 'GENERAL': return GENERAL_FIELDS; } }}
<template> <lightning-combobox label="Case type" options={caseTypes} value={caseType} data-bind="caseType" onchange={bind} ></lightning-combobox> <c-bolt-form record={$Case}> <lightning-button label="Save" onclick={handleSave} ></lightning-button> </c-bolt-form></template>