View Source Surface.AST.FunctionComponent (Surface v0.12.0)

An AST node representing a function component

Properties

* `:module` - the component module
* `:fun` - the render function
* `:type` - the type of function (:local or :remote)
* `:props` - the props for this component
* `:directives` - any directives to be applied to this tag
* `:children` - the tag children
* `:meta` - compilation meta data
* `:debug` - keyword list indicating when debug information should be printed during compilation

Summary

Types

@type t() :: %Surface.AST.FunctionComponent{
  debug: [atom()],
  directives: [Surface.AST.Directive.t()],
  dynamic_props: Surface.AST.DynamicAttribute.t(),
  fun: atom() | Surface.AST.AttributeExpr.t() | nil,
  meta: Surface.AST.Meta.t(),
  module: module() | Surface.AST.AttributeExpr.t(),
  props: [Surface.AST.Attribute.t()],
  slot_entries: %{
    :default => [Surface.AST.SlotEntry.t() | Surface.AST.SlotableComponent.t()],
    optional(atom()) => [
      Surface.AST.SlotEntry.t() | Surface.AST.SlotableComponent.t()
    ]
  },
  type: :local | :remote | :dynamic
}