Components
Custom components#
Custom components are a way to taylor your documentation to your product.
Making a custom component#
Since Guider uses MDX, you can use any React components in your pages.
Here is an example of a simple custom component:
import { useState, useCallback } from "react";
import { Button } from "@neato/guider/client";
export function Counter() {
const [num, setNum] = useState(1);
const increase = useCallback(() => {
setNum(v => v + 1);
}, [])
return <Button onClick={increase}>Clicked {num} times</Button>;
}
Learn how to make React components with this official React guide