Giter Club home page Giter Club logo

fable-react_native-demo's Introduction

Fable on React Native demo

This is a demo application for React Native development in F# using Fable.

If you want to try it out then please do the following:

Make sure FSharp is installed

Make sure that the FSharp compiler is properly installed on your operating system:

Make sure React Native works

Running F# code on React Native

  • Pull latest master
  • Open Android Simulator or connect a device in debug mode via USB
  • Run build.cmd debug from command prompt
  • Go to android device simulator and you should see something like

Device Running

  • Go to the F# source in VS Code make a change and save the file
  • Fable watch should pick up this change automatically and compile it
  • Go to android device simulator and press r+r - change should be visible

This could look like:

Hot loading

Error handling

Unauthorized device

If you run build.cmd debug and it compiles everything, but nothing happens... go to the packager output and search for hints. One pitfall might be "Skipping device, Device is UNAUTHORIZED". With

adb devices

you can see the list of devices, probably one of them is marked as UNAUTHORIZED. First, try

adb kill-server

and try it again. If it doesn't help, you can push the public key onto the device again:

cd ~/.android && adb push adbkey.pub /data/misc/adb/adb_keys

After rebooting the device, access should be granted again.

Licenses not accepted

If the above does not work, and still nothing happens after it compiles everything, the licenses may need to be accepted on your computer. To accept the licenses run the following commands for your platform

On a Mac run the following

$ANDROID_HOME/tools/bin/sdkmanager --update

On Windows run the following

“%ANDROID_HOME%\tools\bin\sdkmanager” --update

Re-run the build script and everything should work.

fable-react_native-demo's People

Contributors

alfonsogarciacaro avatar davidpodhola avatar forki avatar inosik avatar krzysztof-cieslak avatar slesa avatar

Watchers

 avatar

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.