How to use the gatsby-link.navigateTo function in gatsby-link

To help you get started, we’ve selected a few gatsby-link 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 freeCodeCamp-China / learn / src / auth / index.js View on Github external
if (err) {
          console.log(err);
          return navigateTo('/strange-place');
        }
        if (authResult && authResult.accessToken && authResult.idToken) {
          return (
            this.setSession(authResult)
              .then(user => {
                updateUserSignedIn(true);
                return fetchUserComplete(user);
              })
              // this could be current-challenge
              .then(() => navigateTo('/#'))
          );
        }
        return navigateTo('/strange-place');
      });
    }
github appbaseio / Docs / src / components / SearchBox / SearchBox.js View on Github external
onSuggestionSelected = (e, {suggestion}) => {
    const prefix = this.props.prefixSlash ? '/' : '';
    navigateTo(prefix + suggestion.url);
  };
github azer / homepage / src / templates / photo.js View on Github external
onKeyPress(event) {
    if (event.keyCode === 37) {
      navigateTo(this.state.previous)
    } else if (event.keyCode === 39) {
      navigateTo(this.state.next)
    }
  }
github calpa / gatsby-starter-calpa-blog / src / pages / search.js View on Github external
this.debouncedSetState = setTimeout(() => {
      const url = searchStateToUrl(this.props, searchState);
      navigateTo(url);
    }, updateAfter);
    this.setState({ searchState });
github azer / homepage / src / templates / photo.js View on Github external
onKeyPress(event) {
    if (event.keyCode === 37) {
      navigateTo(this.state.previous)
    } else if (event.keyCode === 39) {
      navigateTo(this.state.next)
    }
  }
github greglobinski / gatsby-starter-mini-catalog / src / components / Container / Container.js View on Github external
onSwipedRight = e => {
    const toScreen = this.getToScreen(PREV);
    navigateTo(toScreen);
  };
github chingu-voyage6 / grad.then / src / components / StoryCard.js View on Github external
readStory() {
    navigateTo(`/stories/${this.props.slug}`)
  }
github hshoff / ui-kit / packages / docs / src / layouts / index.js View on Github external
this.setState({ activeKey: key }, () => {
      navigateTo(to);
    });
  }
github chingu-voyage6 / grad.then / src / templates / storyBlog.js View on Github external
  const goBack = () => navigateTo('/stories')
  const {

gatsby-link

An enhanced Link component for Gatsby sites with support for resource prefetching

MIT
Latest version published 15 days ago

Package Health Score

92 / 100
Full package analysis