Components

LinkBase

<LinkBase href externalLink callback navigateTo preventDefault navigateToImpl disableAjaxLinks />

Constructor

# <LinkBase href externalLink callback navigateTo preventDefault navigateToImpl disableAjaxLinks />

This component generates an anchor tag. Instead of doing a browser page load, it will go to the next page via AJAX. Analytics scripts will be fired correctly (and if not, it's a bug) LinkBase is not connected to the store or plugged to context, this is used as an alternative for usecases such as partial hydration where context is lost.

import { LinkBase } from '@quintype/components';
<LinkBase href="/section/story-slug" otherLinkAttribute="value">Text here</LinkBase>
PropTypes:
Name Type Required Description Default
href string Yes
externalLink bool No
callback func No
navigateTo func No @private
preventDefault func No @private (e) => { e.preventDefault(); e.stopPropagation(); }
navigateToImpl func No @private
disableAjaxLinks bool No @private global.disableAjaxLinks || global.disableAjaxNavigation

View Source components/link-base.js, line 20