Skip to content

Feature request: ability to export an object from a component #19

@moltar

Description

@moltar

Instead of:

export default [ componentName ]

Would be great to be able to do:

export default { componentName }

The use case is that the component can then be much easier consumed from another component by name.

E.g.:

// component-two.ts

import { componentOneService } from './component-one'

// now can do something with component's data
componentOneService.metadata.name

What do you think?

Can just maybe call Object.values() on the component default export, if it's not array.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions