File tree
Expand file treeCollapse file tree1 file changed
+4
-4
lines changed Expand file treeCollapse file tree1 file changed
+4
-4
lines changed Original file line number | Diff line number | Diff line change |
---|
@@ -1066,24 +1066,24 @@ class UserSettings {
|
1066 | 1066 |
|
1067 | 1067 | **Good:**
|
1068 | 1068 | ```javascript
|
1069 |
| -// the module userAuth.js |
| 1069 | +// code in a module: userAuth.js |
1070 | 1070 | function hasValidCredentials(user) {
|
1071 | 1071 | // ...
|
1072 | 1072 | }
|
1073 | 1073 |
|
1074 | 1074 | export default hasValidCredentials;
|
1075 | 1075 |
|
1076 | 1076 |
|
1077 |
| -// the module userSettings.js |
| 1077 | + |
| 1078 | + |
| 1079 | +// code in a different module: userSettings.js |
1078 | 1080 | import hasValidCredentials from 'userAuth.js';
|
1079 | 1081 |
|
1080 | 1082 | function changeSettings(user, settings) {
|
1081 | 1083 | if (hasValidCredentials(user)) {
|
1082 | 1084 | // ...
|
1083 | 1085 | }
|
1084 | 1086 | }
|
1085 |
| - |
1086 |
| -export default changeSettings; |
1087 | 1087 | ```
|
1088 | 1088 | **[⬆ back to top](#table-of-contents)**
|
1089 | 1089 |
|
|
You can’t perform that action at this time.
0 commit comments