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
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.mjsas 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.mjsnow 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.mjsexamples/functional/defineComponent/Component.mjs