Split "extra" modules into their own packages
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Refactoring
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- fsharp, react-native
- Ambito
- developer-experience, documentation, mobile
Direzione di ricerca
Inizia facendo un inventario dei moduli sotto src/extra e dei confini dei package, incluso src/extra/react-native-sqlite-storage/Fable.ReactNativeSqlite.fs. Esamina gli esempi di Helpers, DeviceInfo, react-native-fs e SQLite nell’issue, quindi determina le modifiche necessarie a package, binding e documentazione. Il lavoro è completato quando gli extras possono essere utilizzati e individuati separatamente con API e documentazione appropriate.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Having every possible react-native module just as an "extra" module makes using rn with fable very cumbersome
1) Versioning
- Some of these packages depend on a specific version of react-native but here they are all available in this one single package (see for example notice of react-native-fs) and they could be easily incompatible with the current version of rn.
- They are not compatible with Femto making it hard to find and use different versions of an "extra" package
2) Discoverability
Using the auto-opened "Helpers" module is the most unhelpful thing to have, because the user will have functions that are globally available and the only way to find them is by having to look in the source code, for example the "helper" of device info:
[<AutoOpen>]
module Helpers =
let private deviceInfo: obj = importDefault "react-native-device-info"
/// Gets the API level.
let getAPILevel () : int =
deviceInfo?getAPILevel() |> unbox
/// Gets the application name.
let getApplicationName () : string =
deviceInfo?getApplicationName() |> unbox
Please replace instead with DeviceInfo as [<RequireQualifiedAccess>], i.e.
[<RequireQualifiedAccess>]
module DeviceInfo =
let private deviceInfo: obj = importDefault "react-native-device-info"
/// Gets the API level.
let getAPILevel () : int =
deviceInfo?getAPILevel() |> unbox
/// Gets the application name.
let getApplicationName () : string =
deviceInfo?getApplicationName() |> unbox
3) The use of ts2fable-like constructs
Going through some of the extra packages, I still see U<...> being used instead of proper arguments, for example in here where it is not obvious how the location of the SQLite database can be instantiated from a float
4) Adhoc Bindings
for example react-native-fs now only includes two functions:
[<AutoOpen>]
module Helpers =
[<Import("default","react-native-fs")>]
let private fileSystem = obj()
let deleteFile (uri:string) : unit = fileSystem?unlink(uri) |> ignore
let getBase64File (uri:string) : JS.Promise<string> = fileSystem?readFile(uri,"base64") |> unbox
This is not helpful for the users of the library and they are better off writing these functions in their application code instead of having two random functions
5) Zero docs
Might be the biggest reason that it is hard to get started with this library, even though it has a really high potential next to electronjs that there is no docs on the "extra" packages
@forki @alfonsogarciacaro @MangelMaxime
- Lingua principale
- F#
- Stelle
- 53
- Fork
- 11
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di fable-compiler/fable-react-native
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
fable-compiler/fable-react-native#65 · 3 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
fable-compiler/fable-react-native#60 · 2 commenti ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
fable-compiler/fable-react-native#59 · 8 commenti ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
fable-compiler/fable-react-native#53 · 1 commento ·
-
Working with gesturesAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
fable-compiler/fable-react-native#37 · 2 commenti ·
Tutte le issue di fable-compiler/fable-react-native
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
prime-radiant-inc/evener#3873 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
micromatch/picomatch#223 ·
I maintainer di solito rispondono entro 11 giorni
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
mksglu/context-mode#1268 ·
I maintainer di solito rispondono entro 5 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
[bug] Setup fails with "Cannot find matching keyid" when an older Node's corepack is on PATHForse già presa @EyalPoly l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno