All Projects → SAFE-Stack → Safe Nightwatch

SAFE-Stack / Safe Nightwatch

Licence: unlicense
Demo of SAFE-Stack applied to React Native for cross platform native mobile apps

Programming Languages

fsharp
127 projects

Projects that are alternatives of or similar to Safe Nightwatch

Fable.SemanticUI
React.SeamanticUI to Fable bindings
Stars: ✭ 15 (-89.36%)
Mutual labels:  fable
Awesome Fable
A curated list of useful Fable tutorials, libraries and software. Inspired by awesome list. Feel free to contribute.
Stars: ✭ 376 (+166.67%)
Mutual labels:  fable
Fable Material Ui
Fable bindings for Material-UI https://mvsmal.github.io/fable-material-ui/
Stars: ✭ 60 (-57.45%)
Mutual labels:  fable
parcel-plugin-fable
Parcel asset type plugin for Fable
Stars: ✭ 21 (-85.11%)
Mutual labels:  fable
Fable.Jester
Fable bindings for jest and friends for delightful Fable testing.
Stars: ✭ 28 (-80.14%)
Mutual labels:  fable
Elmish
Elm-like abstractions for F# apps
Stars: ✭ 569 (+303.55%)
Mutual labels:  fable
Feliz.Recoil
Fable bindings in Feliz style for Facebook's experimental state management library recoil.
Stars: ✭ 43 (-69.5%)
Mutual labels:  fable
Fable Elmish Electron Material Ui Demo
Complete boilerplate for Electron apps using Fable and Elmish with hot module reloading, time-travel debugging, etc.
Stars: ✭ 101 (-28.37%)
Mutual labels:  fable
Feliz
A fresh retake of the React API in Fable and a collection of high-quality components to build React applications in F#, optimized for happiness
Stars: ✭ 273 (+93.62%)
Mutual labels:  fable
Fable.simplehttp
Http with Fable, made simple.
Stars: ✭ 57 (-59.57%)
Mutual labels:  fable
Feliz.Bulma
Bulma UI (https://bulma.io) wrapper for amazing Feliz DSL
Stars: ✭ 57 (-59.57%)
Mutual labels:  fable
Feliz.MaterialUI
Feliz-style Fable bindings for Material-UI
Stars: ✭ 57 (-59.57%)
Mutual labels:  fable
Ionide Vscode Fsharp
VS Code plugin for F# development
Stars: ✭ 660 (+368.09%)
Mutual labels:  fable
Feliz.MaterialUI.MaterialTable
Fable bindings written in the Feliz-style for material-table.
Stars: ✭ 17 (-87.94%)
Mutual labels:  fable
Snowflaqe
A dotnet CLI tool to work with GraphQL queries: static query verification, type checking and code generating type-safe clients for F# and Fable.
Stars: ✭ 69 (-51.06%)
Mutual labels:  fable
fable-electron
Fable bindings for Electron apps
Stars: ✭ 30 (-78.72%)
Mutual labels:  fable
Safe Bookstore
Working sample of a SAFE-Stack project with hot reloading
Stars: ✭ 464 (+229.08%)
Mutual labels:  fable
Fable.reaction
Fable Reaction - Reactive (AsyncRx) for F# Elmish and Fable
Stars: ✭ 122 (-13.48%)
Mutual labels:  fable
Compost
Composable data visualization library for JavaScript
Stars: ✭ 88 (-37.59%)
Mutual labels:  fable
Feliz.materialui
Feliz-style Fable bindings for Material-UI
Stars: ✭ 42 (-70.21%)
Mutual labels:  fable

React Native + SAFE demo

This is a demo application for React Native development in F# using Fable and the SAFE stack. SAFE is a technology stack that brings together several technologies into a single, coherent stack for typesafe, flexible end-to-end web-enabled applications that are written entirely in F#.

SAFE-Stack

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

Requirements

On OS X/macOS, make sure you have OpenSSL installed and symlinked correctly, as described here: https://www.microsoft.com/net/core#macos.

dotnet SDK 3.0.100 is required but it will be downloaded automatically by the build script if not installed (see below). Other tools like Paket or FAKE will also be installed by the build script.

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 - 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.

The app is not updating on saving code changes

If the app does not update whenever you save an F# code change even after Fable compilation succeeds, you may need to enable hot reloading from the in-app developer menu. It is accessed by opening the app and shacking the device or causing the emulator to simulate a shake or by using the command:

adb shell input keyevent 82

Click on "Enable Hot Reloading". Now when you save a code change and Fable compiles it, you should see the result in the app on your device or emulator automatically.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].