Skip to content

Latest commit

 

History

History
14 lines (10 loc) · 670 Bytes

CODING.md

File metadata and controls

14 lines (10 loc) · 670 Bytes

Some coding advice for this Blog

Import Next with prefix

Just as a rough guideline, import the NextJS components with a Next prefix, e.g. NextLinkinstead of the generic way the suggest in the documentation. Reduces errors with standard html components and other react packages. Also gives a clear indication on what comes from Next.

Create a NextJS Link including Chakra UI

The following snippet generates a NextJS link that uses the ChakraUi styling. You need to import next/linkas NextLinkfor this to work. The magic attribute here is passHref.

<NextLink href="/" passHref>
    <Link color="primary">Titel des Links</Link>
</NextLink>