wrap api callback with check to component.isMounted()