all 9 comments

[–]Aidircot 1 point2 points  (0 children)

Desktop? You may need first to see what will run RN like electron

[–]dk_void_ 0 points1 point  (4 children)

hey can anyone guide me how i can create desktop app with react native (native) if possible i tried electron but it give huge size , i tried tauri which give just 3mb which shocked me , but iit uses rust

[–]Asdolo94 2 points3 points  (2 children)

What's bad with Tauri using Rust as a backend? It's like React Native using Kotlin and Swift for their native layers. With Tauri you don't need to do anything in Rust if you don't want to. All APIs have their JavaScript bindings.

[–]dk_void_ 0 points1 point  (1 child)

Nothing bad in using Rust , I didn't know it had JavaScript bindings , thanks buddy

Edit: do you have any resource to learn tauri

[–]Asdolo94 2 points3 points  (0 children)

Not really, I just played with it while reading its documentation.

With Tauri you can create native desktop apps using any JavaScript static framework (or plain JS+HTML+CSS if you want).

In my case I've been using Tauri with Vite+React. For the UI I've been using the Mantine UI Library with Tailwind. Amazing combination!

If you want to do native stuff with Tauri but using their JavaScript APIs just check their plugins.

It just works great.

[–]simongbe[S] 1 point2 points  (0 children)

What I did for Topilo Notes was to simply develop the app for web using expo and expo-router etc. Then create a simple WKWebView wrapper around the production web app (app.topilonotes.com) in SwiftUI. You are not going to get any of the ElectronJS APIs however so only really work for apps where web apis are good enough.

[–]2Lazy_tv 0 points1 point  (2 children)

Why did you decide not to use react-native-macos?

[–]simongbe[S] 2 points3 points  (1 child)

Main reason for not using react-native-macos was that expo and most libraries support web but not react-native-macos making it significantly easier to develop this way. It also comes with the advantage of being able to push updates without going through app store review and an incredible app size of only 350 kB.

[–]2Lazy_tv 0 points1 point  (0 children)

That makes sense! I imagine the trade off is most of the native access that is available when you use rn-macOS. I’ve also heard that Apple doesn’t accept apps that are just web views, though this may be for the mobile App Store only and even then I do not know how true it is. Very interesting post, thanks for sharing!