I have this code inside a composer to render an error in my app. I'm successfully entering the if statement and printing the error to the console. But for some reason, the error is not rendering in place of the component. Instead, my app continually displays the loading component.
Any ideas?
console.log('here');
if (notPermitted) {
const error = new Error(`You do not have the correct permissions`);
console.log(error);
onData(error);
}
I have this code inside a composer to render an error in my app. I'm successfully entering the if statement and printing the error to the console. But for some reason, the error is not rendering in place of the component. Instead, my app continually displays the loading component.
Any ideas?