module Phlex::Context

def component(component, *args, **kwargs, &block)

def component(component, *args, **kwargs, &block)
  assigns = instance_variables
    .reject { _1.start_with? "@_" }
    .map { [_1, instance_variable_get(_1)] }.to_h
  comp = component.new(*args, assigns:, **kwargs, &block)
  self << comp
end

def text(content)

def text(content)
  self << Text.new(content)
end