How to use the arc.initializeArc function in arc

To help you get started, we’ve selected a few arc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github daostack / alchemy / src / App.tsx View on Github external
public async componentWillMount() {
    // Do this here because we need to have initialized Arc first
    // we initialize Arc
    initializeArc()
      .then(async () => {
        this.setState({ arcIsInitialized: true });
        persistStore(store);

      })
      .catch ((err) => {
        console.log(err);
      });

    let GOOGLE_ANALYTICS_ID: string;
    switch (process.env.NODE_ENV) {
      case "production": {
        // the "real" id
        GOOGLE_ANALYTICS_ID = "UA-142546205-1";
        break;
      }
github daostack / alchemy / src / App.tsx View on Github external
public async componentWillMount() {
    // Do this here because we need to have initialized Arc first
    // we initialize Arc
    initializeArc()
      .then(async () => {
        this.setState({ arcIsInitialized: true });
        persistStore(store);

      })
      .catch ((err) => {
        console.log(err);
      });

    ReactGA.initialize("UA-142546205-2");
    history.listen((location: any) => {
      ReactGA.pageview(location.pathname + location.search);
    });
  }