Sha256: b22247f9eaf671860b3778607ecc21efa6ab67ac729766b28c886d21f98883f5

Contents?: true

Size: 957 Bytes

Versions: 12

Compression:

Stored size: 957 Bytes

Contents

Hyalite
====

[![Build Status](https://travis-ci.org/youchan/hyalite.svg?branch=master)](https://travis-ci.org/youchan/hyalite)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/youchan/hyalite?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)


This is ruby virtual DOM implementation using opal. It is inspired by react.js.

Example
----

```ruby
require 'hyalite'
require 'browser/interval'

class ExampleView
  include Hyalite::Component

  state :count, 0

  def component_did_mount
    every(5) do
      @state.count += 1
    end
  end

  def render
    div({class: 'example'},
      h2(nil, @props[:title]),
      h3(nil, "count = #{@state.count}")
    )
  end
end

$document.ready do
  Hyalite.render(Hyalite.create_element(ExampleView, {title: "Hyalite counter example"}), $document['.container'])
end
```

How to execute this example is the following.

```
> cd example
> rackup
```

Open url `http://localhost:9292`.

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
hyalite-0.2.7 README.md
hyalite-0.2.6 README.md
hyalite-0.2.5 README.md
hyalite-0.2.4 README.md
hyalite-0.2.3 README.md
hyalite-0.2.2 README.md
hyalite-0.2.1 README.md
hyalite-0.2.0 README.md
hyalite-0.1.1 README.md
hyalite-0.1.0 README.md
hyalite-0.0.6 README.md
hyalite-0.0.5 README.md