Skip to content

Commit

Permalink
Promote ASYNC_ITERATOR symbol to React Symbols (#28851)
Browse files Browse the repository at this point in the history
So that when we end up referring to it in more places, it's only one.

We don't do this same pattern for regular `Symbol.iterator` because we
also support the string `"@@iterator"` for backwards compatibility.

DiffTrain build for [c0cf7c6](c0cf7c6)
  • Loading branch information
sebmarkbage committed Apr 17, 2024
1 parent 9080248 commit 1db2e35
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7909d8eabb7a702618f51e16a351df41aa8da88e
c0cf7c696cf454b49b35d8dae01ab111739dab46
3 changes: 1 addition & 2 deletions compiled/facebook-www/ReactFlightDOMClient-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ if (__DEV__) {
// The Symbol used to tag the ReactElement-like types.
var REACT_ELEMENT_TYPE = Symbol.for("react.element");
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
var ASYNC_ITERATOR = Symbol.asyncIterator;

function readTemporaryReference(set, id) {
if (id < 0 || id >= set.length) {
Expand Down Expand Up @@ -1172,8 +1173,6 @@ if (__DEV__) {
}
}

var ASYNC_ITERATOR = Symbol.asyncIterator;

function resolveErrorDev(response, id, digest, message, stack) {
var error = new Error(
message ||
Expand Down

0 comments on commit 1db2e35

Please sign in to comment.