function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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.