Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 1.58 KB

README.org

File metadata and controls

34 lines (26 loc) · 1.58 KB

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’.
  • 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.

Build instructions: Running the examples

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

  • opam install incr_dom
  • dune build example/incr_decr/bin/{main.bc.js,index.html}
  • Open _build/default/example/incr_decr/index.html in a web browser!