Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update React.propTypes -> PropTypes #265

Merged
merged 2 commits into from
Apr 10, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-helmet",
"description": "A document head manager for React",
"version": "5.0.2",
"version": "5.0.3",
"main": "./lib/Helmet.js",
"author": "NFL <[email protected]>",
"contributors": [
Expand Down Expand Up @@ -32,7 +32,8 @@
"dependencies": {
"deep-equal": "^1.0.1",
"object-assign": "^4.1.1",
"react-side-effect": "^1.1.0"
"react-side-effect": "^1.1.0",
"prop-types": "^15.5.4"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(sorry for nitpicking)
I guess this line should be moved before react-side-effect (to keep the list sorted alphabetically).

},
"devDependencies": {
"babel-cli": "^6.24.0",
Expand Down
35 changes: 18 additions & 17 deletions src/Helmet.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from "react";
import PropTypes from "prop-types";
import withSideEffect from "react-side-effect";
import deepEqual from "deep-equal";
import {
Expand Down Expand Up @@ -28,24 +29,24 @@ const Helmet = (Component) => class HelmetWrapper extends React.Component {
* @param {String} titleTemplate: "MySite.com - %s"
*/
static propTypes = {
base: React.PropTypes.object,
bodyAttributes: React.PropTypes.object,
children: React.PropTypes.oneOfType([
React.PropTypes.arrayOf(React.PropTypes.node),
React.PropTypes.node
base: PropTypes.object,
bodyAttributes: PropTypes.object,
children: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.node),
PropTypes.node
]),
defaultTitle: React.PropTypes.string,
encodeSpecialCharacters: React.PropTypes.bool,
htmlAttributes: React.PropTypes.object,
link: React.PropTypes.arrayOf(React.PropTypes.object),
meta: React.PropTypes.arrayOf(React.PropTypes.object),
noscript: React.PropTypes.arrayOf(React.PropTypes.object),
onChangeClientState: React.PropTypes.func,
script: React.PropTypes.arrayOf(React.PropTypes.object),
style: React.PropTypes.arrayOf(React.PropTypes.object),
title: React.PropTypes.string,
titleAttributes: React.PropTypes.object,
titleTemplate: React.PropTypes.string
defaultTitle: PropTypes.string,
encodeSpecialCharacters: PropTypes.bool,
htmlAttributes: PropTypes.object,
link: PropTypes.arrayOf(PropTypes.object),
meta: PropTypes.arrayOf(PropTypes.object),
noscript: PropTypes.arrayOf(PropTypes.object),
onChangeClientState: PropTypes.func,
script: PropTypes.arrayOf(PropTypes.object),
style: PropTypes.arrayOf(PropTypes.object),
title: PropTypes.string,
titleAttributes: PropTypes.object,
titleTemplate: PropTypes.string
};

static defaultProps = {
Expand Down