We are making a api call, and in response we get a url. In Angular JS, we can trust the url by using $sce.trustAsResourceUrl.
So what will be the equivalent of trustAsResourceUrl in React JS.
In Angular,
//Here response is my api response
var url = $sce.trustAsResourceUrl(response.url);
The above url to use in an iframe.
Since React doesn't bind URLs to resources like Angular can, the need for trusted resources doesn't occur.
Utilising the URL in a React app is something you do outside of the framework i.e. using fetch.
In essence, React doesn't manage your resources like Angular does because the resources are not bound to framework elements - unlike Angular's ng-src.
This is still the case when using an iframe. The src isn't bound to the component in the way that ng-src binds. Instead it's really just rendering the iframe and giving it the standard HTML attributes.