Giter Club home page Giter Club logo

expo-test's Introduction

shadow-cljs expo test

Consider this a pre-alpha Work in Progress. The goal here is to use react-native entirely without their packager running since that just gets in the way and makes things significantly more complicated. It is far from user-friendly but it works.

For this demo you'll need to have an actual Android or iOS device with the Expo app installed. The emulator does not work yet.

First clone and install shadow-cljs.

git clone https://github.com/shadow-cljs/expo-test.git
cd expo-test
npm install

We could technically use the folder created by create-react-native-app as the project root but I kinda wanted to isolate what it generates from the actual files required by shadow-cljs for demo purposes. So instead the actual react-native project is generated into a sub-directory "DemoApp".

npx create-react-native-app DemoApp

This takes a while but should eventually end in Happy hacking!. Do not run ANY of the printed instructions.

Instead just run shadow-cljs to compile our demo app.

# run one of these depending on which device you have available
npx shadow-cljs watch ios
npx shadow-cljs watch android

# or run both
npx shadow-cljs watch ios android

Once this finishes compiling you should be able to load the App in Expo.

It currently does not generate the QRCode you'd usually get from the CRNA tools but you can easily generate one online. I used https://www.qr-code-generator.com/.

Just generate a QRCode for the URL:

# for iOS
exp://<insert-your-ip-here>:18000
# for Android
exp://<insert-your-ip-here>:18001

shadow-cljs should have printed your IP on startup.

shadow-cljs - Using IP "192.168.1.13" from Interface "Intel(R) Ethernet Connection (2) I219-V"

So this would be

exp://192.168.1.13:18000

When you have the QRCode generated just scan it with the Expo App. It should load and show some text.

Live-Reload is enabled and should just work.

expo-test's People

Contributors

thheller avatar

Stargazers

Leo avatar Joel Boehland avatar Logan Powell avatar Burin Choomnuan avatar Josef Pospíšil avatar Boris Kourtoukov avatar  avatar Dima Novotochinov avatar  avatar Akash Shakdwipeea avatar Tommi Reiman avatar Jorge David avatar Tienson Qin avatar Will Acton avatar

Watchers

 avatar James Cloos avatar Boris Kourtoukov avatar Burin Choomnuan avatar

Forkers

daveliepmann

expo-test's Issues

Having trouble viewing demo on expo

I followed the instructions and everything looks like it's working on the server end:

screen shot 2018-07-30 at 10 56 07 am

However, I'm getting this error when I open it in the expo app:

image-1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.