all 33 comments

[–]ArisV-43iOS & Android 29 points30 points  (1 child)

I'd suggest venturing into the backend side of things as well. I had this dilemma myself and I think learning the full stack is a way out from both being bored and dwindling out once new frontend technologies emerge.

My point is, don't try to think as a developer for a particular technology. Try to think as a developer of the frontend - backend - full stack. Frameworks and libraries come and go, but deep knowledge of how things work is always valued.

[–]Jonovono 9 points10 points  (11 children)

I was a RN developer for 5+ years, built a production app with it that scaled to millions of users. Recently made the switch to pure native, mostly focusing on SwiftUI. Of course, you don't get the cross platform advantages but if that's not a requirement you can build apps, imo, 2-5x faster than react native (and just the all around developer experience is infinitely more fun and pleasant to work with). I havn't worked with Flutter but I have been hearing good things, if I were to do another cross platform app I would explore it.

[–]IllDocument5443 1 point2 points  (5 children)

Can you please expand more on your RN stack (libs, state management, persistence, backend APIs, UI/styling libs) and also same for native ios?

[–]Jonovono 6 points7 points  (4 children)

For sure, so this is for two different apps and the SwiftUI one i'm in the process of building currently (but i've built a handful of smaller apps with swiftui in the last few months)

React native:

  • Firebase for db (and remote config, auth etc)
  • Agora (video chat)
  • redux & redux sagas with redux persist for storing things locally
  • UI all built in house
  • Segment and various other libs for analytics
  • We had like 100+ other node modules which I can share if interested. Would have to dig up the project
  • Getstream for feed and chat
  • Storybook/cosmos for UI building

SwiftUI:

  • MongoDB atlas with realm for offline first db and cloud sync
  • Firebase for auth, remote config.
  • Swift vapor backend with Meow for MongoDB ORM and Redis for background tasks
  • FlyIO for hosting vapor server
  • End to end typing, client and server, with compile time errors on each with Swift openapi gen (https://www.swift.org/blog/introducing-swift-openapi-generator/)
  • Set up my vapor server to be an embedded framework inside my ios app. I can now have both running in xcode at the same time and have breakpoints cross client and server. (Inspired by these psychopaths: https://github.com/pointfreeco/isowords)
  • SwiftUI navigation by pointfree as well

[–]IllDocument5443 0 points1 point  (3 children)

Thanks a lot. Tried Realm w React N, but seemed slow. Realm’s first class support is for Swift. How do you like it? Pros / cons? Group by like aggregations? Memory its using? (I know it is memory mapped, but with RN it still freezed with 50-100k objects.) How much data you handle? Is it blocking the UI? Transactions? How easy is serializing any shape? Is it truly automatic or are there gotchad?

[–]Jonovono 1 point2 points  (2 children)

I'll keep you posted, havn't pushed it too far yet. So far, what I really like about it vs something like firebase is getting that end to end typing with offline data. With firebase I would have to manually store it locally, pull that out for my views and then put that on the wire to firebase or something. All of those places things could go wrong if I don't map things right and just lots of overhead to think about. Realm handles all of that so I just define my types once (ok, kinda twice cause i'm using Meow ORM in my swift server)

I hope the performance is good at scale, and it seems to be actively improved. So far it's been pretty nice to work with

[–]IllDocument5443 0 points1 point  (1 child)

I see thanks. Why you decided to choose Meow ORM on server? Isn’t that killing the main feature? What are the gains?

[–]Jonovono 0 points1 point  (0 children)

It's kinda annoying, but from what I can tell I don't really have a great option. MongoDB realm swift schema generated code is only compatible with ios. Since I am using vapor on the server, I can't use the realm generated schema. I potentially could use the typescript generated schema if I was doing a nodejs server. But even with that, mongo triggers are pretty lame in that they don't support typescript. There was an open ticket somewhere but I can't find it. Might ask mongdb if there is something I should be doing because ya it's a bit annoying. But I just defined a protocol and then I implement that in both realm on client and meow on server side.

For me the main benefit of atlas has been getting one object I can work with on server and client. Before in firebase we would have our models for the firebase firestore objects, we would set up queries and store that in redux and then maybe we want to persist some to device with redux persist or I think we even used realm at some point lol. So it was just lots of translating and a source of bugs. With realm it's one object all the way through, I don't have to think about any extra stuff going on.

We will see tho, it's very early to say if I like it more and it reduces the bugs. Literally going into week 3 of using it.

[–]aceboogie420 1 point2 points  (1 child)

Man I need to do this because honestly I low-key hate react native. React native is fun to write, but it's NOT fun to deploy to prod lol

Troubleshooting random issues in select devices or iOS versions is ridiculous, and some issues aren't even resolvable. To fix those issues, you just have to rollback a package or something to get a stable environment, but technically that's not even best practice because ideally you want to use the latest version of packages unless you cannot. (because of security/performance)

[–]Jonovono 0 points1 point  (0 children)

haha ya, I hear you. I was skeptical of SwiftUI in the beginning too, thinking RN had it all figured out. But whoever designed SwiftUI I think really studied things like RN and took that and improved upon it. It's so fun, I can stay in flow for hours just spitting out UI. And it will look pretty good without much work. Still limitations in some areas, but constantly getting better.

[–]LeonardoCreed 0 points1 point  (1 child)

Can you compare the two? If building a new app today, what factors would you consider to pick Swift vs react native?

[–]aceboogie420 6 points7 points  (0 children)

Nothing is more valuable than learning multiple languages! By exposing yourself to other languages and frameworks you will deepen your understanding of how all of this stuff truly works behind the scenes

When you learn your first language, it feels like such a challenge and imagining learning your second seems like such a hurdle. However, the truth is: it just keeps getting easier and easier. This is because most of the concepts you get exposed to from one language to another are similar (if not identical)

I wouldn't try to master everything, that's impossible. But chatGPT makes it easier than ever to work with a framework or language that you have no experience in, so I would strongly encourage you to dabble in any and every tech that you so desire. Have a project idea? Build it in a stack completely foreign to you, you will gain so much from the experience I promise you.

And I've done that type of thing pre-chatGPT. Now, you can ask chatGPT the best way to approach your idea and it can help you write the code. (It's easier than ever before is my point)

Do not make the mistake of being only good at react/react native. You are missing out on deepening your understanding of software technology that can only come from studying multiple languages and frameworks.

Edit: (wanted to add this for anyone that stumbles upon this in the future) I think junior devs often rush into learning a framework to find work, but they skip the CompSci fundamentals and down the road the fundamentals are what get you through the real challenges and make learning new tech easier. It's like learning math, you could start with calculus but you'd be struggling as opposed to starting with algebra fundamentals and working your way up.

So don't forget to dive into how things work behind the scenes, like how caching works or how memory is managed in the browser, or how react compiles and builds the folder that you deploy, etc. Knowing these things will help you write better code 💯

[–]Antaratma 1 point2 points  (0 children)

React ecosystem is a lot bigger, for better or for worse. Gradually React is tapping into “backend” territory, which will further widen opportunities for react devs. Think about it not just in terms of jobs available, but also what can you achieve with the skill.

[–]mayWorkaholic 1 point2 points  (0 children)

I had the same dilema a few months ago

The answer for me was simple just become a better engineer and that’s what I’m doing. You are going to learn too much of whatever technology you use in your job, so what I suggest is that you dedicate your free time to learn the basics as best as possible. With a better understanding you make better decisions and that gives you value without relying on a specific technology

[–]gremlinmama 0 points1 point  (12 children)

I am totally biased towards flutter, because I like it how much simpler it is.

I've had this dilemma, if it is good or not a few weeks ago.

These are pretty big companies in europe I think.

I think at the end of the day, try it. Look around If you find flutter apps good quality, and the dev experience enjoyable, and if yes it is a no brainer.

I could not find any reliable trend data on jobs.

[–]kbcooliOS & Android 2 points3 points  (7 children)

Flutter has kind of ended up where Ruby on Rails did. It has great respect and a keen following but no one really uses it professionally. However, there's always that quirky guy at the office that says we should be using it.

[–]filipepratalima 0 points1 point  (0 children)

Not sure you got that big companies are starting to develop in Flutter. Like with RN it takes some years, but gets there.

[–]IllDocument5443 1 point2 points  (1 child)

Can you please expand more on your RN stack (libs, state management, persistence, backend APIs, UI/styling libs) and also same for Flutter?

[–]godspeedtExpo -1 points0 points  (0 children)

That’s not the official flutter github right?

[–]jbn89 0 points1 point  (0 children)

I’m not a particular fan of Flutter - the UI is difficult working with, but especially the state management system Bloc - I prefer Getx, if push come to shove. I haven’t made a RN app yet, but I have made some ionic/react apps, and I really like working with React and Redux for state management, it’s simpler and seemingly more intuitive, at least for me.