// assign handleBlur to parent's onBlur i.e. <Parent onBlur={handleBlur} />
handleBlur(event) {
// currentTarget is the parent element, relatedTarget is the clicked element
if (!event.currentTarget.contains(event.relatedTarget)) {
// code when clicked outside parent and children components
}
}