--- id: docusaurus-core title: Docusaurus Client API sidebar_title: Client API --- Docusaurus provides some API on client that can be helpful when building your site. ## `
` This reusable React component will manage all of your changes to the document head. It takes plain HTML tags and outputs plain HTML tags and is beginner-friendly. It is a wrapper around [React Helmet](https://github.com/nfl/react-helmet). Usage Example: ```jsx {2,6,11} import React from 'react'; import Head from '@docusaurus/Head'; const MySEO = () => ( <>
>
);
```
Nested or latter components will override duplicate usages:
```jsx {2,5,8,11}
```
## ``
This component enables linking to internal pages as well as a powerful performance feature called preloading. Preloading is used to prefetch resources so that the resources are fetched by the time the user navigates with this component. We use an `IntersectionObserver` to fetch a low-priority request when the `` is in the viewport and then use an `onMouseOver` event to trigger a high-priority request when it is likely that a user will navigate to the requested resource.
The component is a wrapper around react-router’s `
Check out my blog!
{/* Note that external links still use `a` tags. */}
Follow me on Twitter!
Learn more about Docusaurus using the{' '}
official documentation
{title}
;
};
```
## `useBaseUrl`
React Hook to automatically append `baseUrl` to a string automatically. This is particularly useful if you don't want to hardcode your baseUrl.
Example usage:
```jsx {3,11}
import React, {useEffect} from 'react';
import Link from '@docusaurus/Link';
import useBaseUrl from '@docusaurus/useBaseUrl';
function Help() {
return (
Browse the docs