Skip to content

Stateless components #57

@aalin

Description

@aalin

Components that don't implement any callbacks or have state should be implemented somehow. Not exactly sure how though. Not sure how styles would work with this.

Some sketches:

:ruby
  Greeter = StatelessComponent.define <<~HAML
    %p Hello #{$name}
    :css
      p { font-weight: bold; }
  HAML

  def greet(name) = <<~HAML
    %p Hello #{name}
  HAML

%div
  %Greeter(name="Foo")
  %Greeter(name="Bar")
  = greet("Foo")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions