File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -1066,24 +1066,24 @@ class UserSettings {
10661066

10671067
**Good:**
10681068
```javascript
1069-
// the module userAuth.js
1069+
// code in a module: userAuth.js
10701070
function hasValidCredentials(user) {
10711071
// ...
10721072
}
10731073

10741074
export default hasValidCredentials;
10751075

10761076

1077-
// the module userSettings.js
1077+
1078+
1079+
// code in a different module: userSettings.js
10781080
import hasValidCredentials from 'userAuth.js';
10791081

10801082
function changeSettings(user, settings) {
10811083
if (hasValidCredentials(user)) {
10821084
// ...
10831085
}
10841086
}
1085-
1086-
export default changeSettings;
10871087
```
10881088
**[⬆ back to top](#table-of-contents)**
10891089

0 commit comments

Comments
 (0)