Skip to main content
  1. Communicate Between Lightning Web Components > Communicate from Parent to Child 
  2. in this trailhead  task  in Step 

1. Task is saying to make the variable public by adding @api decorator in the numerator.js file and in  

in one step task is aksing to set @api counter = 0 ; 

and in  upcoming task is asking to 

 

  @api 

  maximizeCounter() { 

    this.counter += 1000000; 

  }

 

so   final is code will loook like this 

@api counter = 0 ; 

 @api 

  maximizeCounter() { 

    this.counter += 1000000; 

  }

 

and here comes the error that you can not reassign public property value  

#Trailhead Challenges

3 respuestas
0/9000