Best way to maintain application state in in React-Native? - react-native

I worked with react(for web) and used Redux. It seems to me very comfortable. Now I'm working with React-Native and want to maintain somehow my application state. I wanted to use redux, but read in some guides that on React-Native today this is not a very good practice(it's better to use react-contexts). So I'm a little bit confused. Could you explain me what is the better way to maintain\change React-Native application state?

Related

Using React Native with Next.js

I’m in the process of building a web app using Next.js for a bootcamp project. It’s a simple trip planning / packing list app, and I think it’d be really useful as a mobile app—especially since it doesn’t have too much going on. I chose Next for it because it was part of the MVP for the project.
I know there’s a lot involved—I know Swift and have Xcode. Is React Native my best bet for this? Does it work with Next? I went down a Google rabbit hole and saw an article about using Next with Capacitor and Ionic.
Does anyone have any strong opinions? A mobile app is a stretch goal for my project, so I wanted to make the best and quickest decision.

What is the best solution for Local Notifications in IOS for react native?

As the React Native website informs us PushNotificationsIOS is now deprecated. What is recommended is using https://github.com/react-native-community/react-native-push-notification-ios. However, this project does not seem to be maintained or commonly utilized. Frustratingly, it lacks Typescript support.
I am having problems using a Notification Content Extention for some nice custom iOS notifications. I suspect this has something to do with react-native-push-notification-ios's use of now deprecated UILocalNotification. Like many projects in the elephant graveyard that is the RN ecosystem, it seems painfully out of date. I'm reluctant to further troubleshoot my issues because it seems like a lonely, time consuming and potentially fruitless effort. Additionally, I'm trying to avoid writing a lot of native code.
Is there a solution I am missing here? Or am I asking for too much native support from React Native?
I always use firebase for my notifications. It works really well in my opinion. https://rnfirebase.io/docs/v5.x.x/notifications/introduction

Implementing React native maps with redux

Can anyone recommend me some articles / docs or (better yet) tutorials on a comprehensive implementation of Redux with React-Native-Maps? I am currrently working on a project that would requires such.
I want to have the global state of the user location and destination.
Also, I want to be able to multiple map render, with different destinations.
I assume I should be able to achieve this with redux, however my knowledge of redux is quite basic, like the todo app example.
Kindly advice otherwise or share your thoughts.
I think its best if you start with getting a practical understanding of Redux, the TODO app will not take you far. start with this
Once you are comfortable with Redux, this is a repo that integrates react native maps, (camera as a bonus) and react Redux application.
Hope this Helps!

Is Expo adequate for a middle or big size app?

I've been using React Native for more than a year, but I never tried Expo deeply. I only made some test 3 months before. In that time I found that you were not allowed to write and integrate Java / Swift commponents if you needed to use them.
Also I found a bit difficult to reload the app depending on the wifi signal.
In some days, I will start a new middle size app. So I wonder if is it a good aproach to start it using Expo ?
Your question is mostly opinion based and it is likely to be closed. It would be best to ask if or how you can solve an enterprise issue with Expo.
To me, while Expo is promising and interesting, is only good for either small apps or prototypes.
Pretty much you answered the question yourself. Native intengration is not possiblr and sooner or later you are going to need it in your app, otherwise you will be very limited.
Also, it adds another layer of dependency into your project. Let's say Expo updates something that breaks your app, you might need to re write everything.
Big companies or big projects cannot be stopped by this. So, to me, Expo is not a very good approach for mid size apps and above, but of course, it depends on your objective.
Maybe this big app of yours is a one time app, that needs no native integration whatsover and that you don't mind if you need to re write in the future, then yes, you could use Expo since it could help you speed up delivery.

Should I create my ReactNative App with Redux?

I starting to learn ReactNative to develop Android and iOS Applications. Before that I programming Mobile-Applications with Java and Swift.
The last weeks I search a lot in the web to get experience from other developer that use ReactNative or other "Cross-Platform-Frameworks". Early I hear about Redux and that many developer use it.
I programming some examples in Redux to understand the concept, I have understood something but not quite everything.
So I come to my main question, is it better to programming a ReactNative App for both platforms with Redux ? What are the pros and cons ? And it is better for a beginner to start with ReactNative without Redux ?
Hopefully anyone can answer my question and share his experience, so I understand Redux better.
I'd say first get a good understanding of how React works and read about React best practices because thats what React Native uses to compose hierarchy of native views in React native app.
For a simple app you don't have to use Redux.You can always add it later.
https://blog.tighten.co/you-might-not-need-redux