forked from facebook/react
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Encode better error messages when part of the context is a client ref…
…erence (facebook#28355) Alternative to facebook#28354. If a client reference is one of the props being describes as part of another error, we call toString on it, which errors. We should error explicitly when a Symbol prop is extracted. However, pragmatically I added the toString symbol tag even though we don't know what the real tostring will be but we also lie about the typeof. We can however in addition to this give it a different description because describing this property as an object isn't quite right. We probably could extract the export name but that's kind of renderer specific and I just added this shared module to Fizz which doesn't have that which is unfortunate an consequence. For default exports we don't have a good name of what the alias was in the receiver. Could maybe call it "default" but for now I just call it "client".
- Loading branch information
1 parent
de0a3a2
commit 95f4929
Showing
4 changed files
with
230 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.