/apollo-example

Appllo client example on Exponent and Clojurescript

Primary LanguageJavaScriptEclipse Public License 1.0EPL-1.0

apollo-example

https://exp.host/@tiensonqin/apollo-example

Usage

Install Exponent XDE and mobile client

If you don't want to use XDE (not IDE, it stands for Exponent Development Tools), you can use [exp CLI](https://docs.getexponent.com/versions/v11.0.0/guides/exp-cli.html).
    npm install -g exp

Install Lein

Install npm modules

    npm install

Start the figwheel server

    lein figwheel

Start Exponent server (Using exp)

Also connect to Android device
    exp start -a --lan
Also connect to iOS Simulator
    exp start -i --lan

Add new assets or external modules

  1. require module:
    (def cljs-logo (js/require "./assets/images/cljs.png"))
    (def FontAwesome (js/require "@exponent/vector-icons/FontAwesome"))
  1. Reload simulator or device

Make sure you disable live reload from the Developer Menu, also turn off Hot Module Reload.

Since Figwheel already does those.

Production build (generates js/externs.js and main.js)

lein prod-build