Skip to content

forget the render macro #176

Closed
Closed
@catmando

Description

@catmando

just allow components to be rendered directly in the class body.

describe 'The FreeRender module', js: true do
  it "doesnt need any stinkin render macro" do
    mount 'Foo' do
      class Foo
        include Hyperstack::Component
        include Hyperstack::Component::FreeRender
        DIV(class: :foo) do
          "hello"
        end
      end
    end
    expect(find('.foo')['innerHTML']).to eq('hello')
  end
end

use a module as its experimental... for now.

If you want to use it in your system simply include Hyperstack::Component::FreeRender in your HyperComponent base class.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestready-to-releaseInternal Use Only: Has been fixed, specs passing and pushed to edge branch

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions