Skip to content
This repository has been archived by the owner on Sep 16, 2022. It is now read-only.

v1.0.0

Compare
Choose a tag to compare
@joe-bell joe-bell released this 06 Jun 15:07
56f24ab

No more custom _app.jsx setup!

Migration

  1. Replace imports of import { GoogleFonts } from "next-google-fonts"; to import GoogleFonts from "next-google-fonts";.
  2. Move your href attribute and it's value from GoogleFontsProvider to GoogleFonts
    e.g.
    // components/head.tsx
    import * as React from "react";
    import GoogleFonts from "next-google-fonts";
    
    export const Head: React.FC = () => (
      <GoogleFonts href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" />
    );
  3. Remove the deprecated GoogleFontsProvider from your custom _app.jsx or _app.tsx. If you're not using any other contexts/providers, you may be able to remove this file altogether.