News for hackers. Stuff that matters.
Re:Svelte Native: The Svelte Mobile Development Experience by solarkraft on Monday January 29, 2024 @12:34PM (#39179249)
Why does NativeScript seem so much worse than React Native?
Re:Svelte Native: The Svelte Mobile Development Experience by TomatoTomato on Monday January 29, 2024 @12:57PM (#39179635)
Re:Svelte Native: The Svelte Mobile Development Experience by ex3ndr on Monday January 29, 2024 @07:30PM (#39184768)
Because 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).
Re:Svelte Native: The Svelte Mobile Development Experience by ca-tech-run on Monday January 29, 2024 @08:09PM (#39185118)
Looks like that's a good thing since NativeScript can be naturally multi-threaded: https://docs.nativescript.org/guide/multithreading Using a Worker approach or even by using natural multi-threading techniques enabled through NativeScript, for example: - using iOS DispatchQueue called from {N} here: - https://github.com/triniwiz/nativescript-plugins/blob/670817... - referenced here: https://github.com/triniwiz/nativescript-plugins/blob/670817... - Platform Ref Docs: https://developer.apple.com/documentation/dispatch/dispatchq... Similarly using Background async Tasks on Android to load bitmaps on background thread: https://github.com/triniwiz/nativescript-plugins/blob/670817...
Re:Svelte Native: The Svelte Mobile Development Experience by ex3ndr on Tuesday January 30, 2024 @03:48AM (#39187795)
No, 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.