Skip to content

Commit

Permalink
Put back in the optimization that broken 3.3.1 build - PlainComponent…
Browse files Browse the repository at this point in the history
… replaced with stateless functional component `NullComponent`. Added peerDependencies to enforce React 15 or higher. (nfl#228)
  • Loading branch information
cwelch5 authored Jan 17, 2017
1 parent 86933c3 commit 79403c7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*

- [4.0.0](#400)
- [3.3.2](#332)
- [3.3.1 [BROKEN]](#331-broken)
- [3.3.0](#330)
Expand Down Expand Up @@ -29,6 +30,12 @@
- [1.0.0](#100)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->
## 4.0.0

Features:

- Replacing PlainComponent with stateless functional component `NullComponent`, with a hard requirement to use React 15 or higher.

## 3.3.2

Bugfixes:
Expand Down
5 changes: 4 additions & 1 deletion 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": "3.3.2",
"version": "4.0.0",
"main": "./lib/Helmet.js",
"author": "NFL <engineers@nfl.com>",
"contributors": [
Expand All @@ -24,6 +24,9 @@
"script",
"base"
],
"peerDependencies": {
"react": ">=15.0.0"
},
"dependencies": {
"deep-equal": "1.0.1",
"object-assign": "^4.0.1",
Expand Down
5 changes: 3 additions & 2 deletions src/Helmet.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
TAG_PROPERTIES,
REACT_TAG_MAP
} from "./HelmetConstants.js";
import PlainComponent from "./PlainComponent";

const HELMET_ATTRIBUTE = "data-react-helmet";

Expand Down Expand Up @@ -466,10 +465,12 @@ const handleClientStateChange = (newState) => {
onChangeClientState(newState, addedTags, removedTags);
};

const NullComponent = () => null;

const HelmetSideEffects = withSideEffect(
reducePropsToState,
handleClientStateChange,
mapStateOnServer
)(PlainComponent);
)(NullComponent);

export default Helmet(HelmetSideEffects);
7 changes: 0 additions & 7 deletions src/PlainComponent.js

This file was deleted.

0 comments on commit 79403c7

Please sign in to comment.