Sha256: e813e3038eb8890256ebd6f0dbe27eebbd916482b2e39d43cb29b8bb2ee9a3a6
Contents?: true
Size: 670 Bytes
Versions: 18
Compression:
Stored size: 670 Bytes
Contents
module Inesita module Component include VirtualDOM::DOM include VirtualDom include Render include Cache include Injection def self.included(base) base.extend Inesita::Component::ClassMethods end def mount_to(element) raise Error, "Can't mount #{self.class}, target element not found!" unless element @root_component = self init_injections inject @virtual_dom = render_virtual_dom @root_node = VirtualDOM.create(@virtual_dom) Browser.append_child(element, @root_node) self end attr_reader :props def with_props(props) @props = props self end end end
Version data entries
18 entries across 18 versions & 1 rubygems