What does the @api decorator do in LWC?
spaceto flip
@api marks a property or method as public -- it becomes part of the component's public API. Parent components can set these properties and call these methods. @api myProp; @api myMethod() { ... } Public properties are reactive: when the parent updates them, the child re-renders. @api properties must not start with 'on' and cannot be private.