Skip to content

Commit 917b24a

Browse files
mjacksonMichael Jackson
authored andcommitted
Use integer for channel instead of Symbol
1 parent 6b6e2bf commit 917b24a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

modules/createContext.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,12 @@ function getPropType(value) {
2020
return valueTypes[type] || PropTypes.any;
2121
}
2222

23+
// TODO: Swap this out for Symbol once we don't need a shim for it.
24+
let uid = 1;
25+
2326
function createContext(defaultValue) {
2427
const valueType = getPropType(defaultValue);
25-
const channel = Symbol();
28+
const channel = uid++;
2629

2730
/**
2831
* A <Provider> is a container for a "value" that its <Consumer>

0 commit comments

Comments
 (0)