Skip to content

Commit

Permalink
Fix/revert null component (nfl#227)
Browse files Browse the repository at this point in the history
* Reverting NullComponent as it's incompatible with React 14.  Marking 3.3.1 as broken, bumping to 3.3.2

* updated doctoc for CHANGELOG
  • Loading branch information
cwelch5 authored Jan 17, 2017
1 parent d4e7c1d commit 86933c3
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*

- [3.3.1](#331)
- [3.3.2](#332)
- [3.3.1 [BROKEN]](#331-broken)
- [3.3.0](#330)
- [3.2.3](#323)
- [3.2.2](#322)
Expand All @@ -28,7 +29,13 @@
- [1.0.0](#100)

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

Bugfixes:

- Removed stateless functional component `NullComponent` because of it's incompatibility with React 14 and reverted back to PlainComponent.

## 3.3.1 [BROKEN]

Bugfixes:

Expand Down
2 changes: 1 addition & 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.1",
"version": "3.3.2",
"main": "./lib/Helmet.js",
"author": "NFL <engineers@nfl.com>",
"contributors": [
Expand Down
5 changes: 2 additions & 3 deletions src/Helmet.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
TAG_PROPERTIES,
REACT_TAG_MAP
} from "./HelmetConstants.js";
import PlainComponent from "./PlainComponent";

const HELMET_ATTRIBUTE = "data-react-helmet";

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

const NullComponent = () => null;

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

export default Helmet(HelmetSideEffects);
7 changes: 7 additions & 0 deletions src/PlainComponent.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from "react";

export default class PlainComponent extends React.Component {
render() {
return null;
}
}

0 comments on commit 86933c3

Please sign in to comment.