Please enable JavaScript.
Coggle requires JavaScript to display documents.
Lightning Web Component - Coggle Diagram
Lightning Web Component
Life cycle
constructor
connectedCallback
disconnectedCallback
renderedCallback
errorCallback
Decorator
@ api
@ track
@ wire
advandced concept
global state
constructor: initial state
get/set
get: return state
set: modify state + call callback
pub/sub
pub/sub component
subcribe
add callback to array
publish
trigger call every callback in array
unsubcribe
remove callback from array
{keys:event names; values: functions}
lightning message service
SampleMessageChannel.messageChannel-meta.xml
scope
messageContext
communicate between component
child to parent
create custom event
dispatch event
parent to child
pass down @ api