Skip to main content
100%

Named and Default export

✓ Published0🌍 Public
AAndrea Mignone
Last edited Apr 23, 2021
Created on Apr 23, 2021
Forked from HTML Starter

This example demonstrates the difference between named and default exports in ES6 JavaScript modules, showing how both can be imported together in a React context. The code defines `foo.js` with named exports `foo` and `bar`, plus a default export function, then imports them in `index.js` using mixed import syntax. It uses template literals to log the exported values and imports D3's `select` API to verify the library loads. The rendered page is a minimal HTML document with large centered text, displaying "Hello HTML" without any visualization or data rendering.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes