Skip to content

Commit

Permalink
Externalize React helpers.
Browse files Browse the repository at this point in the history
React’s official policy on these helpers is “use at your own risk”:
- facebook/react#1906 (comment)
- facebook/react#2251 (comment)
- facebook/react#2317
  • Loading branch information
LucSPI committed Jun 28, 2015
1 parent 21d6024 commit 2be4e5c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@
],
"dependencies": {
"core-js": "^0.9.18",
"he": "^0.5.0"
"exenv": "^1.2.0",
"he": "^0.5.0",
"invariant": "^2.1.0",
"shallowequal": "^0.2.1"
},
"peerDependencies": {
"react": "^0.13.x"
Expand Down
6 changes: 3 additions & 3 deletions src/CreateSideEffect.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import invariant from "react/lib/invariant";
import shallowEqual from "react/lib/shallowEqual";
import invariant from "invariant";
import shallowequal from "shallowequal";

const RESERVED_PROPS = {
arguments: true,
Expand Down Expand Up @@ -33,7 +33,7 @@ export default (Component) => {
}

shouldComponentUpdate(nextProps) {
return !shallowEqual(nextProps, this.props);
return !shallowequal(nextProps, this.props);
}

componentDidUpdate() {
Expand Down
2 changes: 1 addition & 1 deletion src/Helmet.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import ExecutionEnvironment from "react/lib/ExecutionEnvironment";
import ExecutionEnvironment from "exenv";
import CreateSideEffect from "./CreateSideEffect";
import {TAG_NAMES, TAG_PROPERTIES} from "./HelmetConstants.js";
import HTMLEntities from "he";
Expand Down

0 comments on commit 2be4e5c

Please sign in to comment.