Removes a view from a TabStack. Throws an exception if the view identity does not exist or was already destroyed.
Remove a view from a TabStack
if (!fin.me.isView) {
throw new Error('Not running in a platform View.');
}
const stack = await fin.me.getCurrentStack();
const googleViewIdentity = await stack.addView({ name: 'google-view', url: 'http://google.com/' });
await stack.removeView(googleViewIdentity);
try {
await stack.removeView(googleViewIdentity);
} catch (error) {
// Tried to remove a view ('google-view') which does not exist in the stack.
console.log(error);
}