Skip to content

Basic Next.js support

Compare
Choose a tag to compare
@daniel-ac-martin daniel-ac-martin released this 26 Nov 19:18
· 119 commits to master since this release

Adds rudimentary support for Next.js to the components. Next.js users can import the supported components via the new @not-govuk/simple-components NPM package. There is also an example Next.js application that can be viewed.

See:

The <Form> component/framework is not currently available for Next.js, but the other components should work, and links should automatically make use of the Next.js router, although only the newer 'App router' is supported'.

Migration

See BREAKING changes below.

It is also possible to view a commit that updates to this version, but it updates all the way from from v0.8.6 to this v0.15.0: UKHomeOffice/design-system@f30d817

BREAKING

  • Some components will now override global styles. Most people will want this, however in the future it would be nice to make this optional. We probably need govuk-frontend to provide modules in order to do that. c6b970d
  • The route-utils package has been discontinued.
    • Router hooks can now be obtained from @not-govuk/router but we no longer provide useMatch.
    • useActive has been renamed useIsActive and is also in '@not-govuk/router'.
    • useIsMounted is now obtained from the new @not-govuk/client-component-helpers package.
    • urlParse is now URI.parse and is in @not-govuk/uri and returns a slightly different object. b344ed3
    • queryString has been moved to @not-govuk/uri
  • Strict mode has been enabled in our base tsconfig which may break things for users that update to it. You will need to either fix each error in your code or disable strict mode. a1553dc

What's Changed

Full Changelog: v0.14.0...v0.15.0