I am facing issue in my code in which the components are loaded dynamically like based on certain condition a component is loaded and if i place this
<script src={{asset('paymentapi/googlePay.js')}}></script>
<script async src="https://pay.google.com/gp/p/js/pay.js" onload="console.log('TODO: add onload function')"></script>
it doesn’t load it.
i want something like first the component loads after that the scripts runs.