Skip to content
This repository was archived by the owner on Jan 25, 2024. It is now read-only.

Commit 79403c7

Browse files
authoredJan 17, 2017
Put back in the optimization that broken 3.3.1 build - PlainComponent replaced with stateless functional component NullComponent. Added peerDependencies to enforce React 15 or higher. (nfl#228)
1 parent 86933c3 commit 79403c7

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed
 

‎CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
33
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
44

5+
- [4.0.0](#400)
56
- [3.3.2](#332)
67
- [3.3.1 [BROKEN]](#331-broken)
78
- [3.3.0](#330)
@@ -29,6 +30,12 @@
2930
- [1.0.0](#100)
3031

3132
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
33+
## 4.0.0
34+
35+
Features:
36+
37+
- Replacing PlainComponent with stateless functional component `NullComponent`, with a hard requirement to use React 15 or higher.
38+
3239
## 3.3.2
3340

3441
Bugfixes:

‎package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "react-helmet",
33
"description": "A document head manager for React",
4-
"version": "3.3.2",
4+
"version": "4.0.0",
55
"main": "./lib/Helmet.js",
66
"author": "NFL <engineers@nfl.com>",
77
"contributors": [
@@ -24,6 +24,9 @@
2424
"script",
2525
"base"
2626
],
27+
"peerDependencies": {
28+
"react": ">=15.0.0"
29+
},
2730
"dependencies": {
2831
"deep-equal": "1.0.1",
2932
"object-assign": "^4.0.1",

‎src/Helmet.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {
77
TAG_PROPERTIES,
88
REACT_TAG_MAP
99
} from "./HelmetConstants.js";
10-
import PlainComponent from "./PlainComponent";
1110

1211
const HELMET_ATTRIBUTE = "data-react-helmet";
1312

@@ -466,10 +465,12 @@ const handleClientStateChange = (newState) => {
466465
onChangeClientState(newState, addedTags, removedTags);
467466
};
468467

468+
const NullComponent = () => null;
469+
469470
const HelmetSideEffects = withSideEffect(
470471
reducePropsToState,
471472
handleClientStateChange,
472473
mapStateOnServer
473-
)(PlainComponent);
474+
)(NullComponent);
474475

475476
export default Helmet(HelmetSideEffects);

‎src/PlainComponent.js

-7
This file was deleted.

0 commit comments

Comments
 (0)
This repository has been archived.