question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[v2] document the programmatic navigation API

See original GitHub issue

🚀 Feature

A programmatic way to navigate through pages.

Have you read the Contributing Guidelines on issues?

Yes.

Motivation

Docusaurus v2 exposes a Link component but doesn’t seem to support a programmatic way to navigate through pages. This is unfortunate when creating Docusaurus themes.

I’m working on a brand new version of Docsearch for our Docusaurus integration, but we cannot leverage the Docusaurus navigation experience via keyboard without refreshes, which unnecessarily slows down the experience. These refreshes also means that we cannot leverage the underlying search client cache that caches the queries, to speed up the experience.

DocSearch preview

Pitch

An API similar to Gatsby’s navigate API would be perfect to leverage the Link API from keyboard navigation.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
francoischalifourcommented, Apr 9, 2020

Yep that’s perfect, I missed that one for some reason—thank you!

(It’ll be a nice addition to the documentation)

0reactions
yangshuncommented, Jun 5, 2020

Basically we just want to add some docs to https://v2.docusaurus.io/docs/docusaurus-core to tell people they can import '@docusaurus/router' which is a re-export of React Router.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Interact programmatically with the Navigation component
The Navigation component provides ways to programmatically create and interact with certain navigation elements.
Read more >
Modern client-side routing: the Navigation API
Learn about the Navigation API, a new API which adds improved functionality to build single-page applications.
Read more >
Migrating to new navigation types
Improve navigation behavior in your app by replacing navigation views with navigation stacks and navigation split views.
Read more >
Navigation API - GitHub Pages
The navigation API provides a web application-focused way of managing same-origin same-frame history entries and navigations. Status of this ...
Read more >
Navigate a single-destination route
You can declare the fragment in your XML layout file as shown below: ... construct the fragment programmatically, as described in the Android...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found