LearnNewsExamplesServices
Frontmatter
id7028
titleFeature: Centralized Functional Component Exports via _export.mjs
stateClosed
labels
enhancement
assigneestobiu
createdAtJul 12, 2025, 8:45 PM
updatedAtJul 12, 2025, 8:46 PM
githubUrlhttps://github.com/neomjs/neo/issues/7028
authortobiu
commentsCount0
parentIssue6992
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJul 12, 2025, 8:46 PM

Feature: Centralized Functional Component Exports via _export.mjs

Closed v10.0.0-beta.6 enhancement
tobiu
tobiu commented on Jul 12, 2025, 8:45 PM

Is your feature request related to a problem? Please describe. Previously, importing functional components and their associated hooks required knowledge of their individual file paths, which could be cumbersome and less intuitive for developers.

Describe the solution you'd like Introduce src/functional/_export.mjs as a centralized barrel file to export key functional utilities. This allows developers to import multiple related items from a single, convenient path.

Implementation Details: src/functional/_export.mjs now exports:

  • Component (from ./component/Base.mjs)
  • defineComponent (from ./defineComponent.mjs)
  • useConfig (from ./useConfig.mjs)

This enables simplified imports like: import {defineComponent, useConfig} from '../../../src/functional/_export.mjs';

Describe alternatives you've considered (None considered, as this is the implemented solution.)

Additional context This enhancement significantly improves the developer experience by streamlining imports, enhancing discoverability, and providing a more consistent API for functional component development.

Affected Files:

  • src/functional/_export.mjs
  • examples/functional/defineComponent/Component.mjs
tobiu assigned to @tobiu on Jul 12, 2025, 8:45 PM
tobiu added the enhancement label on Jul 12, 2025, 8:46 PM
tobiu added parent issue #6992 on Jul 12, 2025, 8:46 PM
tobiu referenced in commit d8ea927 - "Feature: Centralized Functional Component Exports via _export.mjs #7028" on Jul 12, 2025, 8:46 PM
tobiu closed this issue on Jul 12, 2025, 8:46 PM