⛑ SSR-ready Document Head tag management for React 16+
children
prop to HeadProvider
by @marhaupe in https://github.com/tizmagik/react-head/pull/146
Full Changelog: https://github.com/tizmagik/react-head/compare/v3.4.0...v3.4.2
We now also export base
head tag, thanks to @gjacobrobertson in #105
Mostly a maintenance release
Thanks @TrySound #99 #98 Thanks @tizmagik #96 #95
#73 fixes for IE thanks to @alekrist
Thanks to @praxxis this release includes a fix for Googlebot in #63
Many thanks to @TrySound for this release! 🎉
If you're migrating from v2.x
, the TL;DR for what you need to change is:
<HeadCollector />
to <HeadProvider />
(provide a headTags[]
prop on the server)<HeadProvider />
is now also required on the client (it does not need a headTags[]
prop)You can view a diff example of exactly what's required to upgrade from the example app upgrade here: https://github.com/tizmagik/react-head/pull/60/commits/00ccda7a36e6aec7c9752c490a99919e677e5ba3
<Title />
and <Meta />
<HeadProvider />
(formerly <HeadCollector />
) now required on both server and client<HeadTag />
is removed from public api in favour of aliases (Title
, Meta
, Style
, Link
)35b249f Update Example for v3 API (#60) 7989654 Mention HeadProvider requirement in client (#59) 4f8a383 Support open graph protocol (#58) 14c44aa Remove prop-types (#56) 6d6fc02 Remove all SSR tags on mount (#55) 996c2e1 Fix rendering style and link on client (#53) af98110 Make HeadProvider mandatory in the tree (#52) a67506c (tag: v3.0.0-1) 3.0.0-1 5ad1a4f Update size snapshot 7add5b2 Make headTags in <HeadProvider /> optional for client (#50) e3b77e4 Remove HeadTag in favor of head tag components (#47) 1d3f522 Upgrade babel to rc1 (#48) c9ace2e Update README.md 27f7710 Update Example to follow v3 API (#42) 6d14c74 Add support for cascading meta (#39) ead3722 Add support for cascading titles (#37) d48ca47 Upgrade types according api (#38) 752a9ea Replace enzyme with react-test-renderer (#36) 3ab9902 Rename HeadCollector to HeadProvider (#35)
Many thanks to @TrySound for a lot of the recent updates 🎉
0e5d9f7f6428b18053be21b850dc1657b601f8bc Remove prop-types in production (#28) f9a47d13a690884d3c898b9c35fdb9e196b002ca Enable babel loose mode to reduce library size (#27) b763e32acf5a5c4431033d7d3893d24e82fac22a Add babel runtime to reuse helpers across packages (#25) 5569b79c66aed45ea779771108305368495efaad Upgrade to babel 7 (#24) 16825f927a629e11eac47923bcf94197725c03bb Bundle cjs and esm with rollup (#22)
Thanks to @TrySound in #20 we now also export some common aliases for use:
import React from 'react';
import { Title, Style, Meta, Link } from 'react-head';
const App = () => (
<div className="Home">
<Title>Title of page</Title>
<Link rel="canonical" content="http://jeremygayed.com/" />
<Meta tag="meta" name="example" content="whatever" />
// ...
</div>
)