Skip to content
A guided tutorial of the React tutorial in Om.
Clojure
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc
resources/public
src
.gitignore
README.md
comments.json
project.clj

README.md

Om Tutorial: Starter

Motivation

See my blog post.

Intro

This is a walkthrough of sorts for the React tutorial rewritten in Om. I originally made this repo a little while back, but wanted to offer something similar to the original tutorial that explains exactly what is going on at each step.

The walkthrough is organized by using a separate separate branch to represent the different steps of the original tutorial, and the master branch represents the complete code. The documentation for each step is contained within the /doc folder.

Getting Started

For getting the latest version of Om, follow swannodette's instructions here.

Create a new project template with lein new om-starter <name-of-repo> substituting <name-of-repo> with whatever you want to call the repository. The /doc directory contains files tutorial1.md through tutorial15.md that correspond 1:1 in functionality (JS and CLJS don't always have a 1:1 mapping), with the original tutorial. Many of the files contain several of the original tutorials.

After creating your repo with the lein template om-starter, cd into it and run lein dev. This will start up a minimal web server that will serve up your HTML and JS, and compile the CLJS into JS. The server will likely start before the JS is compiled on the first go, so after the message Successfully compiled "resources/public/js/your_repo.js" in #ofseconds seconds. shows up in the terminal window, refresh your page to verify that everything is working correctly.

Time to hack.

You can’t perform that action at this time.