How to use the scrivito.finishLoading function in scrivito

To help you get started, we’ve selected a few scrivito 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 Scrivito / scrivito_example_app_js / src / Components / Intercom.js View on Github external
}).then(intercomAppId => {
      if (intercomAppId) {
        Scrivito.finishLoading().then(() => {
          installIntercom(intercomAppId);
          this.setState({ intercomAppId });
        });
      }
    });
  }
github Scrivito / scrivito_example_app_js / src / utils / cookieConsentGiven.js View on Github external
export default function cookieConsentGiven() {
  return Scrivito.finishLoading().then(() => cookiePromise);
}
github Scrivito / scrivito_example_app_js / src / index.js View on Github external
import * as ReactDOM from "react-dom";
import * as Scrivito from "scrivito";
import "./Objs";
import "./Widgets";
import App from "./App";
import "./config";
import "./assets/stylesheets/index.scss";

if (window.preloadDump) {
  Scrivito.preload(window.preloadDump).then(({ dumpLoaded }) => {
    dumpLoaded ? hydrateApp() : renderApp();
  });
} else {
  window.prerenderReady = false;
  renderApp();
  Scrivito.finishLoading().then(() => {
    window.prerenderReady = true;
  });
}

function renderApp() {
  ReactDOM.render(, document.getElementById("application"));
}

function hydrateApp() {
  ReactDOM.hydrate(, document.getElementById("application"), () =>
    Scrivito.updateContent()
  );
}

scrivito

Scrivito is a professional, yet easy to use SaaS Enterprise Content Management Service, built for digital agencies and medium to large businesses. It is completely maintenance-free, cost-effective, and has unprecedented performance and security.

LGPL-3.0
Latest version published 25 days ago

Package Health Score

68 / 100
Full package analysis