Skip to content

Commit

Permalink
docs: readme now reflects renderStatic provides title that renders wh…
Browse files Browse the repository at this point in the history
…ole tag (#261)

* helmet does not contain titleAttributes
* avoid duplication of title tags
  • Loading branch information
hiroshi-cl authored and cwelch5 committed Apr 9, 2017
1 parent ce5a7b1 commit a96db3f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ This `helmet` instance contains the following properties:
- `script`
- `style`
- `title`
- `titleAttributes`

Each property contains `toComponent()` and `toString()` methods. Use whichever is appropriate for your environment. For attributes, use the JSX spread operator on the object returned by `toComponent()`. E.g:

Expand All @@ -114,7 +113,7 @@ const html = `
<!doctype html>
<html ${helmet.htmlAttributes.toString()}>
<head>
<title>${helmet.title.toString()}</title>
${helmet.title.toString()}
${helmet.meta.toString()}
${helmet.link.toString()}
</head>
Expand All @@ -136,7 +135,7 @@ function HTML () {
return (
<html {...htmlAttrs}>
<head>
<title>{helmet.title.toComponent()}</title>
{helmet.title.toComponent()}
{helmet.meta.toComponent()}
{helmet.link.toComponent()}
</head>
Expand Down

0 comments on commit a96db3f

Please sign in to comment.