I moved an App from Embedded, to NOT Embedded anymore. So it is just not embedded. OK, fine.
For some reason some code that used to work fine to flash a Toast no longer works anymore. I updated to Polaris 6 and App Bridge 1.29 and now Toasts don’t show? What is up? I inspected these parameters and all of them seem to make sense, and so I am wondering what I am doing wrong now. Is this because App Bridge actions do not work unless in an embedded App?
import { Toast } from '@shopify/app-bridge/actions';
import { Context } from '@shopify/app-bridge-react';
const appBridge = useContext(Context);
const statusChangeMessage = {
message: 'Status Change was Saved',
isError: false,
};
const toastNotice = Toast.create(appBridge, statusChangeMessage);
toastNotice.dispatch(Toast.Action.SHOW);