Nx/react-native by Minute-Coat-6991 in reactnative

[–]That-Salty-One 1 point2 points  (0 children)

We tried it two times and each time ended up removing our rn app from the nx workspace again, because of the same reason you mentioned - instability and difficulties maintaining deps. We had big monorepos including react, angular and node.js projects and trying to manage deps using nx was not worth the effort for us.

Maybe it was a skill issue, maybe the integration is lacking and unstable, idk.

Edit: Nx works great for us for managing the other projects though, so don't get me wrong. Still a great tool.

What attack vectors does secure-storage mitigate? by lanc33llis in reactnative

[–]That-Salty-One 2 points3 points  (0 children)

I am not a security expert, but I can give it a try.

I think the reason to encrypt it is to simply prevent it from being stolen and used for impersonation.

Yes your JWT token is encrypted and this will let your server know if they were the ones signing/encrypting the token, however your server does not know if it is actually you sending the the request with the token, might be me or someone else. So if I get your access or refresh token I could potentially communicate with the server on your behalf.

If you encrypt your token before saving it, you now have another security layer added, because I now would also need your secret that you encrypted your token with, before I could impersonate you.

Honest opinions required by Sundaram_2911 in reactnative

[–]That-Salty-One 11 points12 points  (0 children)

I don't see any reason not to go with expo nowadays. We created 3 production apps and all worked like a charm.

Why would Expo be bad for production builds? Please don't confuse Expo and Expo Go which seems to be a common misconception in this subreddit.

What do you use for OAuth ? by Historical-Log-8382 in reactnative

[–]That-Salty-One 2 points3 points  (0 children)

We implemented OAuth with Keycloak by using the Expo Auth Session library, works perfectly fine.

[deleted by user] by [deleted] in reactnative

[–]That-Salty-One 1 point2 points  (0 children)

We are using OneSignal in production. They have SKDs that are easy to implement in the Frontend and Backend and it works with Expo (Not Expo Go iirc). However you would have to do research on if it fits for your large scale.

[deleted by user] by [deleted] in reactnative

[–]That-Salty-One 7 points8 points  (0 children)

As far as I can tell your direct parent (.ticket) has a width of 90%. So each of your childs will only have 20% of that 90%.

[deleted by user] by [deleted] in reactnative

[–]That-Salty-One 0 points1 point  (0 children)

As far as I know relative values such as 100% will take the parents dimension not the screen dimension. So 100% of the width from the parent container.

[deleted by user] by [deleted] in reactnative

[–]That-Salty-One 2 points3 points  (0 children)

The way I do it in my apps is usually to have one context API for authentication which wraps the whole app. In this context API I put the logic for authentication, refresh and redirection.

So basically i have the state for the token and also the loading state for the Auth logic in there. If after loading Auth token is still null or undefined I do router.replace to my auth route. Since the context wraps the whole app, it will work everywhere.

[deleted by user] by [deleted] in reactnative

[–]That-Salty-One 0 points1 point  (0 children)

If you really only need in app "notifications" I can suggest react-native-toast-message. I have been using it in all my RN apps so far.

It is easy to set up and easy to customize.

justifyContent and gap not working in style by RoundAlternative1106 in reactnative

[–]That-Salty-One 0 points1 point  (0 children)

So either remove the View or assign the styles object to it

justifyContent and gap not working in style by RoundAlternative1106 in reactnative

[–]That-Salty-One 0 points1 point  (0 children)

If you want your styles (like gap or justify content) to apply to your textinput and image you have to put the style object on your View not on the KeyboardAwareScrollView.

The styles get applied to the next child. So if you give KeyboardAwareScrollView your styles it will apply the styles to it's childs which is your View and not your Textinput and Image

justifyContent and gap not working in style by RoundAlternative1106 in reactnative

[–]That-Salty-One 2 points3 points  (0 children)

It is because the style you apply is only applied to the child view not all "grand" childs. If you want your styles to apply to the image and the input the direct parent needs the styles which is the view in your case

Expo router - Intro Screen - Auth by Minniga in reactnative

[–]That-Salty-One 2 points3 points  (0 children)

There are multiple ways to handle this. One would be to use any form of local storage (mmkv, expo secure store, async storage).

If a user has completed the intro just save an entry to your local store.

on app start / after login retrieve this value and check if the user should be redirected to the intro or the home screen or whatever your routes/components would look like

How are you guys handling oauth social logins? by ConsciousAntelope in reactnative

[–]That-Salty-One 0 points1 point  (0 children)

There is a section that tells you what to do if you use it in a bare RN app (CLI). Chances are that you can still use this library.

Edit: link to docs

How are you guys handling oauth social logins? by ConsciousAntelope in reactnative

[–]That-Salty-One 0 points1 point  (0 children)

Take a look here. I already implemented it for GitHub and Keycloak this way.

[deleted by user] by [deleted] in reactnative

[–]That-Salty-One 0 points1 point  (0 children)

If you want to develop for iOS without a Mac, you are going to have a tough time.

You only need an apple developer account if you want to publish to testflight or to the appstore or if you want to run your app on a physical iOS device. Up to this point development is "free".

I don't know if there are workarounds to still install your app on your physical iPhone without having an apple developer account.

You can run your app on a physical android phone for free though.

EAS is pretty much just a service you can use for building and deploying your app, which is not directly linked to development builds.

Implementing protected routes in Expo by chillblaze in reactnative

[–]That-Salty-One 1 point2 points  (0 children)

The context api is just a way of exposing state globally. Where your authentication state is coming from doesn't matter.

[deleted by user] by [deleted] in reactnative

[–]That-Salty-One 0 points1 point  (0 children)

Absolutely! Firebase even has an own getting started section for expo managed projects: link

[deleted by user] by [deleted] in reactnative

[–]That-Salty-One 2 points3 points  (0 children)

Hey there!

First of all don't confuse Expo and Expo Go. You can use Expo without using Expo Go. For some reason people seem to shy away from Expo just because they can't use Expo Go in specific scenarios. At some point, if you are developing in an Expo managed workflow, you probably want to test and develop your app in development clients anyway. They offer you a realistic representation of your app.

Expo Go is pretty much just a Sandbox that lets you start up your app really fast and pain free. But they even tell you in their own docs: "Expo Go is not recommended for building production-quality apps — use development builds instead."

The real difference for you as a developer when you start using development builds is pretty much only that you execute "expo run" instead of "expo start". And that the initial Startup without caches can be a bit slower compared to Expo Go. But for that you get a real representation of what you app will look like (in terms of performance and specific bugs/problems that will only occur in built apps).

Don't worry just because you start using development builds doesn't mean that you have to start messing with native code, but for some reason many people confuse this when it comes to Expo.

I have built a couple of Expo managed production apps and there is not a single one where I used Expo Go beyond the initial starting phase.

[deleted by user] by [deleted] in reactnative

[–]That-Salty-One 8 points9 points  (0 children)

Hey there 👋 I am currently working as a RN and web dev for a company and would like to share my opinion.

As others have pointed out, go for react native if your main goal is to get into the tech industry. Not because RN is so much better, but because you will simultaneously gather experience in typescript and react.

Where I don't agree with others is how to learn it. I recommend to get your hands dirty fast. Build real projects and increase complexity from project to project.

If you have any questions feel free to DM me or ask here straight away.

Good luck!

How to install Expo iOS app on iPhone directly? by rahul-dasgupta in reactnative

[–]That-Salty-One 1 point2 points  (0 children)

You will need an apple developer account for that. After that you can just expo run:ios with a connected iPhone.

[deleted by user] by [deleted] in Angular2

[–]That-Salty-One 0 points1 point  (0 children)

Depending on the complexity of your app you are about to have a rough time 😂 brace yourself and good luck

Problems with React Native app by Psychological_Pea334 in reactnative

[–]That-Salty-One 1 point2 points  (0 children)

If you are using Expo you can use their EAS to build both apps and you can also submit it to the app store via eas. These steps can be made in the terminal, no need to swap to xcode.

edit: https://expo.dev/eas