Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
gatsby-link
Advanced tools
An enhanced Link component for Gatsby sites with support for resource prefetching
The gatsby-link package is a part of the Gatsby framework, which is used to create fast, modern websites with React. The gatsby-link package specifically provides a Link component that enables navigation between different pages in a Gatsby site. It leverages the power of React Router and adds enhancements for preloading linked resources, making navigation faster and smoother.
Basic Link
This feature allows you to create a basic link to another page within your Gatsby site. The 'to' prop specifies the path to navigate to.
<Link to="/about/">About</Link>
Active Link Styling
This feature allows you to apply a specific class to the link when the current page matches the link's destination. The 'activeClassName' prop specifies the class to apply.
<Link to="/about/" activeClassName="active">About</Link>
Partially Active Link
This feature allows you to apply active styling to links that match a part of the current URL. The 'partiallyActive' prop is set to true to enable this behavior.
<Link to="/blog/" partiallyActive={true}>Blog</Link>
Preloading Links
This feature allows you to preload the linked page's resources when the link is rendered. The 'preload' prop is set to true to enable preloading.
<Link to="/contact/" preload={true}>Contact</Link>
react-router-dom is a popular package for handling routing in React applications. It provides a set of components for declaratively defining routes and navigation. Unlike gatsby-link, it does not include built-in preloading of linked resources, but it offers more flexibility and is not tied to Gatsby.
reach-router is a small, simple router for React that emphasizes accessibility. It provides a similar Link component for navigation, but it does not include the preloading capabilities of gatsby-link. It is known for its focus on accessibility and ease of use.
All components and utility functions from this package are now exported from gatsby
package. You should not import anything from this package directly.
The API reference has more documentation.
FAQs
An enhanced Link component for Gatsby sites with support for resource prefetching
The npm package gatsby-link receives a total of 121,436 weekly downloads. As such, gatsby-link popularity was classified as popular.
We found that gatsby-link demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.