-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add display name after create context (#13501)
- Loading branch information
Showing
12 changed files
with
146 additions
and
49 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
2 changes: 2 additions & 0 deletions
2
...y-name/test/fixtures/display-name-context/assignment-expression-and-display-name/input.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ThemeContext = React.createContext("light"); | ||
ThemeContext.displayName = "CustomThemeContext"; |
3 changes: 3 additions & 0 deletions
3
...-name/test/fixtures/display-name-context/assignment-expression-and-display-name/output.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ThemeContext = React.createContext("light"); | ||
ThemeContext.displayName = "ThemeContext"; | ||
ThemeContext.displayName = "CustomThemeContext"; |
1 change: 1 addition & 0 deletions
1
...form-react-display-name/test/fixtures/display-name-context/assignment-expression/input.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ThemeContext = React.createContext("light"); |
2 changes: 2 additions & 0 deletions
2
...orm-react-display-name/test/fixtures/display-name-context/assignment-expression/output.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ThemeContext = React.createContext("light"); | ||
ThemeContext.displayName = "ThemeContext"; |
1 change: 1 addition & 0 deletions
1
...el-plugin-transform-react-display-name/test/fixtures/display-name-context/nested/input.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var enhancedContext = qux(React.createContext("light")); |
3 changes: 3 additions & 0 deletions
3
...l-plugin-transform-react-display-name/test/fixtures/display-name-context/nested/output.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
var _ref; | ||
|
||
var enhancedContext = qux((_ref = React.createContext("light"), _ref.displayName = "enhancedContext", _ref)); |
3 changes: 3 additions & 0 deletions
3
...-transform-react-display-name/test/fixtures/display-name-context/object-property/input.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
({ | ||
ThemeContext: React.createContext("light") | ||
}); |
5 changes: 5 additions & 0 deletions
5
...transform-react-display-name/test/fixtures/display-name-context/object-property/output.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
var _ref; | ||
|
||
({ | ||
ThemeContext: (_ref = React.createContext("light"), _ref.displayName = "ThemeContext", _ref) | ||
}); |
3 changes: 3 additions & 0 deletions
3
...babel-plugin-transform-react-display-name/test/fixtures/display-name-context/options.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"plugins": ["transform-react-display-name"] | ||
} |
1 change: 1 addition & 0 deletions
1
...nsform-react-display-name/test/fixtures/display-name-context/variable-declarator/input.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var ThemeContext = React.createContext("light"); |
2 changes: 2 additions & 0 deletions
2
...sform-react-display-name/test/fixtures/display-name-context/variable-declarator/output.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
var ThemeContext = React.createContext("light"); | ||
ThemeContext.displayName = "ThemeContext" |