Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

forget the render macro #176

Closed
catmando opened this issue Apr 24, 2019 · 0 comments
Closed

forget the render macro #176

catmando opened this issue Apr 24, 2019 · 0 comments
Labels
enhancement New feature or request ready-to-release Internal Use Only: Has been fixed, specs passing and pushed to edge branch
Milestone

Comments

@catmando
Copy link
Contributor

catmando commented Apr 24, 2019

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.

@catmando catmando added the enhancement New feature or request label Apr 24, 2019
@catmando catmando added this to the alpha1.5 milestone Apr 24, 2019
@catmando catmando added the ready-to-release Internal Use Only: Has been fixed, specs passing and pushed to edge branch label Apr 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ready-to-release Internal Use Only: Has been fixed, specs passing and pushed to edge branch
Projects
None yet
Development

No branches or pull requests

1 participant