What pattern is demonstrated by mixing default and named exports?
// circle.js
export const PI = 3.141592653589793;
export default class Circle {
constructor(radius) {
this.radius = radius;
}
}
// main.js
import MyCircle, { PI } from './circle.js';
This code demonstrates the 'primary export with utilities' pattern: 1) The default export represents the main functionality (Circle class), 2) Named exports provide related utilities or constants (PI), 3) This pattern is common when a module has a clear primary purpose with supporting elements, 4) It allows for clean importing syntax while maintaining access to auxiliary exports, 5) It's particularly useful for class modules with related static values or helper functions, 6) It provides flexibility in how the module can be consumed, 7) It helps organize code by grouping related functionality while highlighting the primary export.