Does React Native perform Tree Shaking? - react-native

I am trying to weigh up the benefits of converting moment to date-fns.
Moment is currently 316k or 67.6k gzipped.
date-fns/format is 3k.
We deliver updates through CodePush so minimising the JavaScript bundle is something that we need to definitely think about doing.
Does React-Native perform Tree Shaking?

react-native or more specifically, the metro-bundler that comes with react-native by default doesn't support tree-shaking.
Tree-shaking issue was closed. You could find their motivation here.

Related

react native vs flutter ,should i move from react-native to flutter

i am react native developer , and my question is more generic than code
i am getting really frustrated with react native and the amount of bugs it has
and the extremely low performance on android devices specially the old ones
almost all of the important api are third party developed on github and they not maintained anymore with alot of bugs.
some codes doesn't work sometimes,
what i noticed with highly used(10k+ users) application in react native
on some android devices fetch request is repeated 4 times.
on some android devices async-storage is working probably .
on await and async are getting ignored
React.usestate is buggy and it is ignored sometimes
does flutter offer a better environment with less bugs
Speaking from personal experience, flutter is better than react native for several reasons, but I'll list the few best ones here:-
More interactice community :- Flutter has way more answered question in the past 2 years on stackoverflow than react
Better docs - The flutter docs cover everything, I mean everything\
Nativeness - Flutter does a great job at making the app look as native to the platform as possible
Wide range of packages - Like it says, there is a package for everything, You can also use platform views just in case there is something on the native side you want to add so there are no limits
The editors - OMg I cannot say how much easier it is with good descriptions of all the commands within the code. I mean you can hover on a function and if made by the flutter team or a proper package team, you'll see the full implementation
Rid of any form of html or css - The designing, is much much much much much * infinity easier because everything makes just more sense from a programmer's poin t of view
Great debugging - With flutter, you can debug on different scales, even on the release scale just in case there is a problem with release mode instead of debug mode and ofcourse the community is always there to help
Regular awesome updates - While react is slowly dying down on new features, flutter is booming. With the recent update to flutter 2.0 introducing null safety, the chance of bugs have gone down even more
So yes, I recommend you try to shift to flutter. There is even a full tutorial in the flutter docs for react-native decs to learn flutter.

Is React Native good for cross-platform Machine Learning apps built with TensorFlow.js?

With the release of tfjs-react-native and the ample support for the platform, is React Native stable and reliable enough for a startup to go all-in on to build cross-platform Machine Learning apps?
Note: We are building a Health-Tech app that uses dietary and physiological data to recommend exercise plans and meal options for optimal health. The most resource-intensive task the app would likely perform is to use open-pose like models to improve exercise posture.
From AirBnB's blog, they moved away from React Native because they had to maintain 3 different codebases as they had started with native development. We are just about starting and have experience with React but are open to considering others like Flutter.
I think you're asking two different questions, you can use tensorflow-js in any js framework. If you want my opinion: go with React, there's simply more documentation on using tensorflow with React, and you already have experience with it. Just don't start developing three different codebases, that's not a matter of React/TF vs Flutter/TF, it's a matter of organisation.

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

Redux-firestore with React-native

Can redux-firestore be used with react-native (expo)? Any special setup to take note if can?
I plan to use react-redux-firebase n understand react-redux-firebase can be used with react native. I like to find out if the same goes for redux-firestore.
Yes, redux-firestore can absolutely be used with react-native. I mostly think of redux-firestore as a "subproject" to react-redux-firebase (RRF), providing the same capabilities you have in RRF for Firebase Realtime Database, but instead using Firestore database (it's not 100% accurate, but good enough :) ).
I mostly follow the RRF documentation, including the stuff that describes using RRF with React Native.
Both the Web/JS and Native Modules instructions point to sample configuration that include code you can uncomment to enable Firestore.

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.