configureLoader() {
    NProgress.configure({
      easing: 'ease',
      speed: 800,
      minimum: 0.2,
      showSpinner: false
    });

    const currentWebView = this.webView.current;
    currentWebView.addEventListener('did-start-loading', () => {
      NProgress.start();
    });

    currentWebView.addEventListener('did-stop-loading', () => {
      NProgress.done();
    });

    currentWebView.addEventListener('new-window', (event) => {
      const currentUrl = this.webView.current.getURL();
      const newUrl = event.url;

      const parsedCurrentUrl = parseUrl(currentUrl, true);
      const parsedNewUrl = parseUrl(newUrl, true);

      // Only allow opening windows from current domain to avoid ads-popups
      if (parsedNewUrl.host === parsedCurrentUrl.host) {
        this.props.onUrl(newUrl);
      }
    });

    // Capture link clicks on page and update state with new url
    currentWebView.addEventListener('did-navigate', (event) => {
      this.setState({
        url: event.url
      });
    });

    // Also handle in-page navigation
    currentWebView.addEventListener('did-navigate-in-page', (event) => {
      this.setState({
        url: event.url
      });
    });
  }
Configures the loader and binds it to
the webview