Skip to content

Separate create and create_fn #230

Description

@Bathtor

I'm seeing more and more that create taking a function is unergonomic for many components, because the things used for creation must be moved into the closure, even if really they are just required by reference for some initial setup.
It is nice, though, to have the closure variant, in particular when a component needs no external state but loads all configuration from config alone.

I suggest we simply split component creation, such that create just takes a ComponentDefinition instance and a new create_fn maintains the current shape.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions