13 ms·
Svelte Native
- miohtama 3y agoSuper, I love Svelte and I hope its unique component model fits well for the native mobile app development. Is the tool chain very different from React native?
- woahitsraj 3y agoIt is. This is mostly a Svelte wrapper around NativeScript so it's really not equivalent
- oneseven 3y agoWhatever the merits of this project -- and it does seem to be useful -- they should be a little clearer about the fact that it's not actually part of the "official" svelte framework. I'm sure they consider it a tribute but it fees a little deceptive that they're cloning the svelte docs look and feel without any kind of "who we are" statement.
- kevinak 3y agoBack when Svelte Native was created it was pretty much endores by the maintainers, there's even a channel for it on the official Svelte Discord :)
- LinguaBrowse 3y agoMoreover, it was made by one of the folks who brought TypeScript support to Svelte (https://github.com/halfnelson/svelte2tsx https://github.com/halfnelson/svelte2tsx), so although it may not be explicitly pushed by the core team, it was still made by a significant core contributor. I'll note that React is the only web renderer that gives official blessing to a native framework, and that's because it's also the only web renderer that built one themselves rather than leaving it to the community.
- kevinak 3y ago100% agree
- yencabulator 3y agoNot sure if this is new but the docs start with a pretty strong disclaimer: https://svelte-native.technology/docs#important-note https://svelte-native.technology/docs#important-note
- hd4 3y agoIs the goal here to reach a minimum subset of basic Android UI functionality? I don't see any push to try and replicate a MD3 feature-set here for example.
- kvgr 3y agoThe example app is 5 years old. Is anybody using this?
- joshdajosh 3y agoIt's being used here: https://github.com/Akylas/OSS-DocumentScanner https://github.com/Akylas/OSS-DocumentScanner
- OJFord 3y agoI think if you're starting today you'd be better off with Tauri (and Svelte as the framework)?
- CharlesW 3y agoTauri Mobile seems far from production-ready, but more importantly, the reason to use something like Svelte Native instead of Tauri Mobile is to avoid web views in favor of a platform-native experience.
- pjmlp 3y agoI would rather stick to either pure mobile Web, or native views + C++, but that is me. No added tooling, only the SDKs from each platform, no late nights debugging integration layers, lack of support on IDEs,...
- ultra_nick 3y agoSDKs for 4+ platforms is added tooling...
- pjmlp 3y agoIt is when it represents debugging the same code 4+ times. That is the fallacy of all these leaky abstractions, the need to actually know the native APIs from each platform doesn't go away. Someone needs to take care of integration problems.
- mixmastamyk 3y agoYes. Want to ship on N platforms, with the cross platform lib now you need to know N+1 platforms.
- gmaster1440 3y agoThis is not so much the Svelte equivalent of React Native as it is just one of the wrappers for NativeScript (https://nativescript.org https://nativescript.org).
- lawgimenez 3y agoNative is such an abused word.
- eximius 3y agoTrue. I think the intent here is "we translate your stuff into non-webviews" which is... pretty much what native means in a mobile context.
- jbverschoor 3y agoThey're making native calls.. Either through message passing, or through creating stubs. You can literally use all of the iOS SDK directly. Not sure why I'm downvoted.. https://old.nativescript.org/native-api-access/ https://old.nativescript.org/native-api-access/ It's the basis of their entire product. On top of that they've built cross-platform wrapper for many UI things. And on top of that, they've integrated several toolkits. They just market it the other way around, which i.m.o. is not helping them with traction. Right now they're always competing with many other products (react native for example), even though they have a very unique product.
- PolCPP 3y agoYuck nativescript
- ca-tech-run 3y ago[flagged]
- deleted 3y ago[deleted]
- solarkraft 3y agoWhy does NativeScript seem so much worse than React Native?
- TomatoTomato 3y agoFunding? Plugin ecosystem like Expo modules? Or maybe use both? https://blog.nativescript.org/nativescript-with-react-native/ https://blog.nativescript.org/nativescript-with-react-native... https://twitter.com/wwwalkerrun/status/1700719038392078607 https://twitter.com/wwwalkerrun/status/1700719038392078607 Then throw in some SwiftUI too https://twitter.com/NativeScript/status/1624895622540328961 https://twitter.com/NativeScript/status/1624895622540328961
- ex3ndr 3y agoBecause they run JS on main thread while react native tries to minimise it at all costs (only keeping rendering and animations, but not layouts for example).
- joshdajosh 3y ago[dead]
- ca-tech-run 3y ago[dead]
- ex3ndr 3y agoNo, even when you are writing directly in swift/kotlin you avoid main thread at all costs. Any overhead here is a death sentence for performance.
- ca-tech-run 3y ago[dead]
- mn-saskatchewan 3y ago
- papa_bear 3y agoMy company tried using this a few years ago to build a cross platform app (and hopefully share a lot of code with our svelte web interface). We made a lot of progress in 3-4 months of trying, but we ended up running into too many odd bugs and edge cases that were difficult to debug. We eventually switched to Flutter for the mobile codebase. No doubt this and nativescript have improved since then, but from my early impressions, I wouldn't have recommended nativescript for anything other than the simplest of interface needs.
- scosman 3y agoThis is the story I’ve heard about almost every react native project. Get to proof of concept 10x faster. Spend 10x more time in the weeds on weird bugs.
- rhodysurf 3y agoNativeScript is not react-native
- mixmastamyk 3y agoAlso the old Cordova equivalent and Kivy. Take mobile development and try to shoehorn a browser-based solution (they don't want) into it. Now you've got two problems and not enough expertise available to help.
- whizzter 3y agoDid they have JS _AND_ React experience beforehand? Or did they just pick RN because it was the cool thing on the block? I foundered on my first attempt at an React app (side project) coming from a C,C++,Java and non-React JS background, but the second one(professionally) after I've had exposure to some React got released and an fork of it is still in use today. And the company I work with has 2-5 other apps out for customers using RN/Expo (thanks to the positive experience I had). We're also strict about using TypeScript though so we're not chasing basic type bugs (since debugging is a tad weaker with RN/Expo even if it's usable if shit the fan only occasionally) and we have plenty of React experience outside of it, biggest "quirks" are often RN/Expo upgrades if we haven't maintained things in a while (the oldest app used a relatively early version of Expo though) or platform specific notification crap (that I've heard is painful regardless of Expo/RN).
- woahitsraj 3y agoWhile I'm a huge Svelte fan, this project hasn't really gotten very much care and attention over the last few years. Which is honestly fine. React and React Native I think do a much better job of filling the niche of people who want to build native apps with web tech. That being said, I think with the progress that Safari has made in implementing PWA support, the increased hostility of Apple toward native developers, and browser improvements like WebGPU coming out soon, I really hope that we no longer have to build native apps for like 95% of use cases. The only major hurdle to this is Apple continuing to treat web apps as second class citizens on iOS and only begrudgingly adding APIs to Safari to make good native experiences.
- sacrosanct 3y ago> The only major hurdle to this is Apple continuing to treat web apps as second class citizens on iOS If you add a site to iOS' homescreen it automatically becomes a PWA. The best example I found of a site fully leveraging this feature is Cryptee[0]. They talk about the PWA thing here: https://crypt.ee/download https://crypt.ee/download [0] https://crypt.ee/ https://crypt.ee/
- throwitaway1123 3y agoThe whole add to home screen process is needlessly convoluted. It would be nice if there was something similar to Smart Banners for PWAs: https://developer.apple.com/documentation/webkit/promoting_apps_with_smart_app_banners https://developer.apple.com/documentation/webkit/promoting_a...
- ezfe 3y agoYou just click "Share -> Add To Home Screen." I understand that that's technically more clicks than a smart banner but hardly "convoluted"
- throwitaway1123 3y agoI think it's convoluted relative to a Smart Banner. Smart Banners give users a clear call to action, and they're not buried in a menu somewhere. It's hard to make this point without linking to a screenshot, but the share menu is incredibly bloated. To get to the add to home screen button a user has to know it's in the share menu (which is just an unlabeled icon), and then scroll past the following menu items: - An options button (which leads to another menu) - Air Drop - Share via text message (with several different contacts listed individually to share with) - Copy - Add to Reading List - Add Bookmark - Add to Favorites - Add to Quick Note - Find on Page
- la_fayette 3y agoI have built many mobile apps in the last years. I always used web technologies rendered inside webviews, using tools like capacitorjs. Since I am very concerned with user experience, I always considered the perceivable UI rendering performance as highly important. For contemporary smartphones I cannot see any benefit in using tools like react native, flutter, nativescript in contrast to rendering inside a webview. I think UI libraries like ionic are indistinguishable from native UI components. At least, to the best of my knowledge, there is no real user study, which proves the contrary. So why should one use such cross-platform tools and not use svelte directly with a webview?
- crowdyriver 3y agoHave you experienced slow scrolling issues? https://github.com/ionic-team/capacitor/issues/4187 https://github.com/ionic-team/capacitor/issues/4187
- refulgentis 3y agoI very much doubt Ionic is visually indistinguishable from native UI components, but I'd love to try if you have a good demo link. My guess is it crosses a "good-enough" threshold for usability, and it feels objective, ex. maybe scroll performance is the same. I strongly believe users notice things feeling "off" in a way that's either subconcious or hard to communicate, and that's why it matters. The reason why I use Flutter instead of JS is for a number of reasons beyond perf / native controls. The shortest version is iOS / Safari makes web apps extremely obviously a worse version of a native app. But I'm picky. I just upgraded macOS and got a "you must accept new T&C" dialog. Accidentally scrolled on it vertically. It did the rubberband effect showing a white background, and I said to myself: "lo, how the mighty Apple has fallen!"
- FlyingSnake 3y agoPowered by NativeScript Hell no. It’s better to stick with RN if you want cross platform. Writing an app in Kotlin and Swift is easier compared to this contraption.
- ca-tech-run 3y ago[flagged]
- sixstringtheory 3y agoPlease stop spamming the same link. If you have something you'd like everyone to see, just make it a top-level comment on the submission. And a bit more substantial commentary on why we should visit it would be nice.
- iamandoni 3y agoAn alternative I’ve been enjoying is @tommertom’s Ionic port (+ Capacitor) for native integration: https://github.com/Tommertom/svelte-ionic-app https://github.com/Tommertom/svelte-ionic-app
- imgabe 3y agoI’ve done a couple React Native apps and never again. They’re fine at first but if you let one sit for a few months there is a combinatorial explosion of complexity among shifting incompatibilities of different versions of javascript libraries, the framework, android/iOS versions, build systems, etc. it becomes a nightmare. I’d much rather just learn Kotlin/Swift and have only one ecosystem to maintain.
- wharvle 3y agoAt the time I used it, it was almost worth it just to use RN for Android even if you did iOS in Swift, just because styling on Android was so hellish ("There must be some non-crazy way to set a default typeface for my app. Right?" LOL wrong; "setting this color on this Material input field must be easy" LOL nope, welcome to Java metaprogramming just to set a goddamn color), the documentation-suggested way to structure apps was so bad that you'd be reaching for other solutions anyway if you valued your sanity (I wanna say Square was at the forefront, here? It was some company like that. Like your best bet was just to find their libraries and blog posts and do exactly what they did, ignore the official docs), and in some cases the native libraries for Google APIs were less-capable than the Javascript ones anyway (Maps was one, I remember—god, what a surprise that was to find out). But that was like 5 years ago so maybe it's gotten better.
- rareitem 3y agoI agree with you. RN still sucks on some aspects, but it's quite an amazing technology and I'm grateful it exists.
- fakedang 3y agoNah, among cross-platform, RN has stagnated while Flutter has sped past. The key issue I see these days is that it's just not worth it to build a mobile app these days unless your payment flow happens outside of the app.
- meowtimemania 3y ago
- deleted 3y ago[deleted]
- joshdajosh 3y ago[dead]
- tamimio 3y agoDocs returned 404
- mn-saskatchewan 3y ago[dead]