Awesome
systems-toolbox-ui
April 2017: this library is now DEPRECATED, it is much less cumbersome to use re-frame instead - see the updated examples in the systems-toolbox and BirdWatch.
This library gives you all you need for building a user interface in the browser on top of React, using ClojureScript and the system-toolbox library.
The general idea is that there is a systems-toolbox component that holds application state and business logic. This component is then observed by UI components. The definition of the UI component is basically a function that transforms application state into a rendered user interface. Interaction with that state component then takes place via sending messages. This approach is somewhat similar to the one found in Redux.
UI components can also hold their own, independent state and interact with it directly, should there be a need for this.
Examples
-
In the examples directory of the systems-toolbox, you can find a basic example example with some counters. This example is somewhat comparable to the respective Redux example. This example is currently client-side only.
-
A much larger example of an application using this library is BirdWatch, a tweet stream analysis application that spans browser and client. There's a live version of this application here.
This library has previously been part of the system-toolbox library and was moved into a separate repository to reduce dependencies.
Testing
As a default, the tests will run in Chrome. This requires you to install ChromeDriver first:
$ bin/get-chromedriver.sh
With ChromeDriver installed, you can fire up the tests:
$ lein integrations-tests
Also, you can run the tests using PhantomJS:
$ BROWSER=phantomjs lein integration-tests
Tests are run automatically on CircleCI using Chrome:
On TravisCI, the tests are run on PhantomJS:
License
Copyright © 2015, 2016 Matthias Nehlsen
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.