| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
Routing utilities for WordPress admin interfaces, providing a shared instance of TanStack Router.
Install the module:
npm install @wordpress/route --saveThis package provides a shared instance of TanStack Router to ensure consistent routing across WordPress admin interfaces.
The following hooks and components are available for use in routes:
import { Link, useNavigate, useParams, useRouter, useSearch } from '@wordpress/route';
function MyRoute() {
const params = useParams();
const navigate = useNavigate();
const search = useSearch();
return (
<div>
<Link to="/other-route">Go to other route</Link>
<button onClick={() => navigate({ to: '/somewhere' })}>
Navigate
</button>
</div>
);
}The boot package uses private APIs for router setup. These should not be used by individual routes.
This is an individual package that's part of the Gutenberg project. The project is organized as a monorepo. It's made up of multiple self-contained software packages, each with a specific purpose.
To find out more about contributing to this package or Gutenberg as a whole, please read the project's main contributor guide.
| Back | FazBrowse Home | New Git URL |