+ Start a Discussion
sherry pengsherry peng 

Issue: The BoatReviews component doesn't have an event handler registered with aura:handler that reloads data from Apex any time the value of the component’s boat attribute is changed

I got following error: 
The BoatReviews component doesn't have an event handler registered with aura:handler that reloads data from Apex any time the value of the component’s boat attribute is changed
Best Answer chosen by sherry peng
sherry pengsherry peng
Per @PatMcClellan__c
Figured it out: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/ref_aura_valueChange.htm

The solution is to add following event handler in BoatReviews.cmp:
<aura:handler name="change" value="{!v.boat}" action="{!c.doInit}"/>

 

All Answers

sherry pengsherry peng
Per @PatMcClellan__c
Figured it out: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/ref_aura_valueChange.htm

The solution is to add following event handler in BoatReviews.cmp:
<aura:handler name="change" value="{!v.boat}" action="{!c.doInit}"/>

 
This was selected as the best answer
Susannah PSusannah P
THANK YOU! I was stuck and this worked like a charm.