Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Translating Errors

To handle an API error, use the hook or use the TranslatedError component. If you can call the TranslatedError component, you should prefer that:

import { TranslatedError } from "@revolt/i18n";

<TranslatedError error={someErrorObject} />

To use the hook:

import { useError } from "@revolt/i18n";

const err = useError();

<span>{err(someErrorObject)}</span>