How to use the mson/lib/globals.get function in mson

To help you get started, we’ve selected a few mson 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 redgeoff / mson-react / src / fields / re-captcha-field.js View on Github external
render() {
    const {
      disabled,
      editable,
      accessEditable,
      classes,
      useDisplayValue
    } = this.props;

    const isEditable = accessEditable !== false && editable && !disabled;

    const siteKey = globals.get('reCAPTCHASiteKey');

    if (isEditable && !useDisplayValue) {
      return (
        <div>
          
        </div>
      );
    } else {
      return null;
    }
  }
}
github redgeoff / mson-react / src / app.js View on Github external
componentDidUpdate(prevProps) {
    const snackbarMessage = globals.get('snackbarMessage');
    if (snackbarMessage) {
      this.displaySnackbar(snackbarMessage);
      globals.set({ snackbarMessage: null });
    }

    if (
      this.props.redirectPath &&
      this.props.redirectPath !== prevProps.redirectPath
    ) {
      this.redirect(this.props.redirectPath);
    }

    if (this.props.path !== prevProps.path) {
      this.navigateTo(this.props.path);
    }