score:6

Accepted answer

you could use a ref to call the child close function?

parent

    removeitem() {
       console.log('clicked');
       this.child.close();
    }

   render() {
      return (
         <div>
            <childwithmodal ref={(ref) => { this.child = ref; }} />
         </div>
      );
   }

child

...

close() {
   this.setstate({ showmodal: false })
};

Related Query

More Query from same tag