Skip to content
Branch: master
Find file History
Latest commit 58b0cc5 Apr 8, 2019
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
counter v0.12-preview.120.18+252 Jan 16, 2019
entry_table
event_propagation
hello_world v0.13-preview.120.29+167 Apr 1, 2019
incr_decr v0.12-preview.120.22+294 Feb 12, 2019
keyboard_events v0.12-preview.120.18+252 Jan 16, 2019
monitor v0.13-preview.120.30+220 Apr 8, 2019
partial_rendering_table v0.13-preview.120.30+220 Apr 8, 2019
table_minimal v0.13-preview.120.30+59 Apr 3, 2019
text_input v0.12-preview.120.21+65 Jan 30, 2019
ts_gui
widget_raw_html v0.12-preview.120.18+252 Jan 16, 2019
README.org
dune v0.12-preview.120.18+252 Jan 16, 2019

README.org

This directory contains a few examples of how the Incr_dom library can be used.

The examples, explained

(Examples with asterisks in front of their name link to in-depth guides. The rest are stubs.)

  • *Text_input: Start here. This example unpacks a basic Incr_dom application, explaining how all the various parts hang together. (The app implements a model-driven text input.)
  • *Ts_gui: A mockup of a very simple trading-system GUI.
  • Incr_decr: The simplest example, which you should be able to understand after reading through the Text_input guide. Makes use of Incr.Map.mapi’.
  • Incr_decr_rpc: A demo with client, web server, and application server all working together using Async RPC.
  • Entry_table: A curses-like application that lets you move with the keyboard through rows of fake data that are constantly ticking with new information.
  • Event_propagation: An app that demonstrates DOM event propagation.
  • Monitor: Showcases error handling in Incr_dom.
  • Partial_rendering_table: Uses the Partial_render_list module that’s a part of Incr_dom_widgets to partially render a long vertical list.
  • Todo_mvc: Implements the TODO MVC app using Incr_dom.
  • Todo_mvc_rpc: Just like Todo_mvc, but persists its data to an RPC server using websockets.

Build instructions: Running the examples

To run any of these examples, follow the steps below:

  • opam install incr_dom
  • jbuilder build example/incr_decr/{main.bc.js,index.html}
  • Open _build/default/example/incr_decr/index.html in a web browser!
You can’t perform that action at this time.