Split "extra" modules into their own packages
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
- Issue-Typ
- Refactoring
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- fsharp, react-native
- Bereich
- developer-experience, documentation, mobile
Rechercherichtung
Beginne mit einer Bestandsaufnahme der Module unter src/extra und der Paketgrenzen, einschließlich src/extra/react-native-sqlite-storage/Fable.ReactNativeSqlite.fs. Überprüfe die Beispiele für Helpers, DeviceInfo, react-native-fs und SQLite im Issue und ermittle anschließend die erforderlichen Änderungen an Paketen, Bindings und Dokumentation. Als erledigt gilt die Aufgabe, wenn die Extras separat nutzbar und mit geeigneten APIs und Dokumentation auffindbar sind.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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
- Vorherrschende Sprache
- F#
- Sterne
- 53
- Forks
- 11
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus fable-compiler/fable-react-native
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
fable-compiler/fable-react-native#65 · 3 Kommentare ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
fable-compiler/fable-react-native#60 · 2 Kommentare ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
fable-compiler/fable-react-native#59 · 8 Kommentare ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
fable-compiler/fable-react-native#53 · 1 Kommentar ·
-
Working with gesturesOffen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
fable-compiler/fable-react-native#37 · 2 Kommentare ·
Alle Issues in fable-compiler/fable-react-native
Ähnliche Issues
-
[doc-healer] DDUw improvement: retry integrity-filtered issue reads with direct single-item lookupsOffenautomation documentation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
diegosouzapw/OmniRoute#18387 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
davidjerleke/embla-carousel#1414 ·
Maintainer antworten meist innerhalb von 4 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
Maintainer antworten meist innerhalb von 1 Tag