Detect shipping country change event on checkout

export default extension(
    `purchase.checkout.shipping-option-list.render-before`,
    async (root, api) => {
        const {shippingAddress} = api;
        let currentShippingCountry=shippingAddress.current.countryCode;
        shippingAddress.subscribe(async (newShippingAddress) => {
            if (currentShippingCountry !== newShippingAddress.countryCode) {
               currentShippingCountry = newShippingAddress.countryCode;
               // do what you need to do
            }
        });
});