If you’re already convinced about ClojureScript and Expo 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
First-class immutable data structures
Minimizing state and side-effects
Practicality and pragmatism are always core values of ClojureScript
Why on Expo?
It all begins with a Simple Made Easy design choice: you don’t write native code.
You don’t have to install or use Xcode or Android Studio or deal with any of the platform specific configuration and project files.
You can write iOS apps on Linux or Windows (provided that you have an iPhone to test it with).
1. Create an Expo project
# 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
2. Connect to a REPL
(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.
Enter a name in the Name field (e.g. “REPL”).
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.
(start-figwheel) in the connected REPL.
3. Start Expo server
# 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.
4. Publish your app
# Generate main.js lein prod-build exp publish
This will publish your app to a persistent URL on Expo, for example: https://expo.io/@community/startr
How do I add custom native modules?
Does it support Google Closure advanced compilation?
It’s still experimental, but it already works for multiple projects.
Does it support source maps?
Can I use npm modules?
⌘ + R in the iOS Simulator, or press
R twice on Android emulators.
Will it support Boot?
Not currently, but we are working on it.
Still have questions? Ask on our forums!