function unmountComponents() {
  const promises = Object.entries(componentsObj).map(([key, val]) => {
    delete componentsObj[key];
    return resolveUnmount(key, val);
  });
  return Promise.all(promises);
}
/**
 * To avoid re-rendering components twice, unmounts existing components from payment methods list
 */
To avoid re-rendering components twice, unmounts existing components from payment methods list
To avoid re - rendering components twice unmounts existing components from payment methods list
function unmountComponents() {
  const promises = Object.entries(componentsObj).map(([key, val]) => {
    delete componentsObj[key];
    return resolveUnmount(key, val);
  });
  return Promise.all(promises);
}
function unmountComponents ( ) { const promises = Object . entries ( componentsObj ) . map ( ( [ key , val ] ) => { delete componentsObj [ key ] ; return resolveUnmount ( key , val ) ; } ) ; return Promise . all ( promises ) ; }
To avoid re-rendering components twice, unmounts existing components from payment methods list
To avoid re - rendering components twice unmounts existing components from payment methods list