If you’re already convinced about ClojureScript and Exponent and know what to do once you have figwheel running, you can just read this section. Otherwise, we encourage you to read the entire guide.
lein new exponent your-project
cd your-project && npm install
lein figwheel
# Now in a new tab, open the project in a simulator
exp start --ios
Note: This guide was written by @tiensonqin, feel free to reach out to him on the Exponent Slack if you have questions!
It all begins with a Simple Made Easy design choice: you don’t write native code.
# Default to use Reagent / Re-frame
lein new exponent your-project
# Or Om Next
lein new exponent your-project +om
cd your-project && npm install
lein figwheel
(start-figwheel)
in the connected REPL.The first time you connect to the repl, you’ll need to create a Leiningen nREPL Configuration unless you have one already.
Run->Edit
configurations.+
button at the top left and choose Clojure REPL.Local REPL
.Use nREPL with Leiningen
.OK
button to save your REPL config.Once this is done, you can connect to the REPL.
In Intellij make sure your REPL config is selected and click the green play button to start your REPL.
Run (start-figwheel)
in the connected REPL.
exp
CLI# Install exp if you have not already
npm install -g exp
# Connect to iOS simulator
exp start --ios
# Or connect to Android devices or simulators
exp start --android
For more information, see exp Command-Line Interface.
For more information, see XDE tour.
# Generate main.js
lein prod-build
exp publish
This will publish your app to a persistent URL on getexponent.com, for example: https://getexponent.com/@community/startr
See How do I add custom native code to my Exponent project?.
It’s still experimental, but it already works for multiple projects.
Yes.
React Native uses JavascriptCore, so modules using built-in node like stream, fs, etc wont work. Otherwise, you can just require like: (js/require "SomeModule")
.
No, you do need to reload Javascript. To do that, select Reload from the Developer Menu. You can also press ⌘ + R
in the iOS Simulator, or press R
twice on Android emulators.
Not currently, but we are working on it.
© Copyright 2025, Exponent. Created using Gatsby.