Skip to content

Commit 992af48

Browse files
StringEpsilontimdorr
authored andcommittedApr 7, 2019
Switch to mini-create-router-context (#6692)
1 parent 2ce1d32 commit 992af48

File tree

5 files changed

+47
-104
lines changed

5 files changed

+47
-104
lines changed
 

‎packages/react-router-dom/.size-snapshot.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
}
1515
},
1616
"umd/react-router-dom.js": {
17-
"bundled": 162277,
18-
"minified": 57870,
19-
"gzipped": 16689
17+
"bundled": 158978,
18+
"minified": 56593,
19+
"gzipped": 16361
2020
},
2121
"umd/react-router-dom.min.js": {
22-
"bundled": 98089,
23-
"minified": 34473,
24-
"gzipped": 10230
22+
"bundled": 95833,
23+
"minified": 33613,
24+
"gzipped": 9925
2525
}
2626
}
+12-12
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
{
22
"esm/react-router.js": {
3-
"bundled": 23391,
4-
"minified": 13245,
5-
"gzipped": 3676,
3+
"bundled": 23396,
4+
"minified": 13250,
5+
"gzipped": 3680,
66
"treeshaked": {
77
"rollup": {
8-
"code": 2209,
9-
"import_statements": 465
8+
"code": 2214,
9+
"import_statements": 470
1010
},
1111
"webpack": {
12-
"code": 3572
12+
"code": 3577
1313
}
1414
}
1515
},
1616
"umd/react-router.js": {
17-
"bundled": 102432,
18-
"minified": 36295,
19-
"gzipped": 11538
17+
"bundled": 98991,
18+
"minified": 35022,
19+
"gzipped": 11227
2020
},
2121
"umd/react-router.min.js": {
22-
"bundled": 63974,
23-
"minified": 22277,
24-
"gzipped": 7899
22+
"bundled": 61594,
23+
"minified": 21423,
24+
"gzipped": 7606
2525
}
2626
}
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// TODO: Replace with React.createContext once we can assume React 16+
2-
import createContext from "create-react-context";
2+
import createContext from "mini-create-react-context";
33

44
const createNamedContext = name => {
55
const context = createContext();
66
context.displayName = name;
77

88
return context;
9-
}
9+
};
1010

11-
const context = /*#__PURE__*/ createNamedContext('Router');
11+
const context = /*#__PURE__*/ createNamedContext("Router");
1212
export default context;

‎packages/react-router/package-lock.json

+25-82
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/react-router/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@
4040
},
4141
"dependencies": {
4242
"@babel/runtime": "^7.1.2",
43-
"create-react-context": "0.2.2",
4443
"history": "^4.9.0",
4544
"hoist-non-react-statics": "^3.1.0",
4645
"loose-envify": "^1.3.1",
46+
"mini-create-react-context": "^0.3.0",
4747
"path-to-regexp": "^1.7.0",
4848
"prop-types": "^15.6.2",
4949
"react-is": "^16.6.0",

0 commit comments

Comments
 (0)
Please sign in to comment.