DEV Community

loading...

I've released over 100 apps in React Native since 2015, Ask Me Anything!

Kyle Johnson on August 21, 2018

Collapse
rokkoo profile image
Alfonso

What do you think about start app using expo? Is better start app with react-native Cli?
What package do you recommend for UX?

Collapse
kylessg profile image
Kyle Johnson Ask Me Anything

No, I would never use Expo for a serious project. I imagine what ends up happening in most projects is they reach a point where they have to ultimately eject the app (e.g. needing a native module) which sounds very painful.

The majority of the apps I've wrote have definitely reached that point, for the individual benefits expo provide (e.g. code push) I've considered trying out using just expo kit but I'd rather just uses a tool specifically for that purpose. Above all, I always like to reduce the level of magic in any application, mobile or not.

Regarding "What package do you recommend for UX", I guess it really depends what you mean. But hopefully this gives you everything you need to know:

  • For navigation I use react-native-navigation, can't recommend this enough as it adds a massive difference in fidelity vs using JavaScript based lib like react-navigation.
  • For interactive elements (drag drop, sliders, parallax etc) I use a forked version of react-native-interactable.
  • For custom vector animations e.g. button icons I use Lottie.
  • I do not use a framework for developing styles/grid layouts (e.g. glamourous), I've got my own base-layout of styles and components.
Collapse
warns profile image
Mert Alnuaimi • Edited

"I would never use Expo for a serious project"

is such a radical decision that I didn't expect to hear from someone in your experience, knowing that Expo is greatly supported by the makers for React Native.

Thread Thread
mjstelly profile image
Michael Stelly

I know this thread has aged. But I felt a need to respond in particular to this comment.

In my experience, Kyle's response is by far the norm among industry professionals I interact with. It's easy to confirm this. Simply post a comment on the Discord channel Reactiflux #react-native that states, "Expo should be the go-to choice for serious react-native projects. Discuss." Then wait for the comments to roll in.

Thread Thread
kylessg profile image
Kyle Johnson Ask Me Anything

lol! If I could like this comment twice I would.

Thread Thread
yannickk profile image
Yannick

This thread aged like crazy but this question could be relevant.
We know your thoughts regarding Expo Managed, but what about Expo Bare Workflow?

Collapse
rokkoo profile image
Alfonso

I'm very grateful for your answer, this is very helpful !! 😊

I use always expo because I'm starting programming in RN, but I think I will start starting project with react-native-cli.

Collapse
kylessg profile image
Kyle Johnson Ask Me Anything

This is a really good question, in a meeting at the moment but will definitely respond to this!

Collapse
pawda profile image
Memoria
  • What do you think about the fluidity of react-native apps ?
    So far, I've seen apps made by Chinese e-commerce giants like Alibaba's Taobao and Jindong, their apps requires lots of resources and are all very slow even on last end Android devices.
    I've also seen some startup using it for chat app and it's simply become unusable after a while because all the memory leaks.

  • Do you think these are just poorly made app or react-native is just not ready to replace native development ?

  • Which app would you recommend to check out in order to see how powerful this framework can be ?

Collapse
kylessg profile image
Kyle Johnson Ask Me Anything

The only case I've seen that can be tricky to keep performant at the moment is when you're doing CPU heavy tasks whilst listing out uncompressed images >2mb. Memory consumption of images this size do seem to be a tricky problem, though libs like react-native-fast-image aim to solve this sort of thing.

I'd say almost certainly they were developed badly, there's no reason now why you couldn't make apps indistinguishable from native. My top tip for this is to move away from JS based navigation libraries (e.g. react-navigation), that's where you see a lot of the performance gains.

Performance wise the Patient View app I made shows this off, I sync and encrypt thousands of records and chart them out whilst keeping everything 60fps.

Collapse
pawda profile image
Memoria

I see, thanks for the answer and cheers for the 100 apps, that's a hell of a pace :)

Collapse
pke profile image
Philipp Kursawe • Edited

How did you do the encrypting/decrypting? Pure JS libs tend to be poor performance wise. Anything native you used?

Collapse
faiz2rock profile image
Faiz rock

Hey kyle, that's wonderful.
I have a question for you please.
I see you use rnn just like me so how do you tackle showing perticular screen after opening app from notification.
E.g user received a notification message in a chat app As app is killed. Now user taps on the notification and app opens. Now how do you redirect to perticular chat? I tried with handleDeepLink but its slow.

Collapse
kylessg profile image
Kyle Johnson Ask Me Anything • Edited

If you haven't moved to RNN v2 by now, I'd recommend it ;)

Collapse
faiz2rock profile image
Faiz rock

Yes, i did move to RNN v2.
Thanks

Thread Thread
kylessg profile image
Kyle Johnson Ask Me Anything

Cool :) I just moved a big project to it, I don't feel like it's perfect yet but still a big improvement over v1. I actually don't understand why so many people are happy with JS based navigation like react-navigation.

Thread Thread
ddashko profile image
ddashko

Hey Kyle, but could you please point out how you tackle this problem with opening app on the specific screen (using RNN v2) after clicking on push notification in tray? What package do you use for handling push notifications?

Thread Thread
ddashko profile image
ddashko

Hey Kyle, but could you please point out how you deal with opening app on specific screen after pressing push notification from tray (using rnn v2)? What package do you use for handling push notifications in conjunction with rnn v2? maybe you could point out to some great examples?

Collapse
ientertainer profile image
Dhruvin Patel

I solved this problem.. If you wish to know ? Ping me

Collapse
ddashko profile image
ddashko

Hey Faiz, were you able to solve this issue? could you please elaborate on what package you used for handling push notifications?

Collapse
onmyway133 profile image
Khoa Pham

What are the most 3 troublesome issues with React Native and how did you overcome?

Collapse
kylessg profile image
Kyle Johnson Ask Me Anything

1 - Upgrading projects from very early versions of React Native. This has been, at times, an absolute nightmare (mainly iOS)! Especially when your project relies on several libs that require native changes. In the end, it was often easiest to create a new react native project from scratch and manually link libraries one by one.

Thankfully, this is rarely an issue now as it has matured. Having said that, I think it's really important to stay on top of React Native versions if your project has longevity.

2 - I had to integrate a react native app to read sensors for a car HUD, no simple way of overcoming this I just had to learn Objective C to write a React Native Bridge. Getting comfortable doing this is really valuable if you run into projects that require specific native functionality.

3 - Once, I hit an error which I could only replicate at the point of uploading a react native app, it would error out with "You must supply a CFBundleIdentifier for this request". This had me banging my head against my desk for a few days. In the end, it was something simple like the way I was creating my release scheme in xcode.

Collapse
mohmdalfaha profile image
Mohammed Nasser

From point 2:

How and what do you recommend developers who have never written native code to go about learning and implementing native modules? Are there any specific courses or just start with any iOS/Android courses found online which don't relate to react native ?

Collapse
mjmaix profile image
MJ Abadilla

on #2 you said that you have to learn Obj-C.

Is is still worth it to learn Obj-C or go straight with Swift if we need to write native modules for our RN project?

Thread Thread
kylessg profile image
Kyle Johnson Ask Me Anything

I feel like it’s actually more useful to learn objc if the purpose is purely for react native. The reason I say this is a lot of the big native modules for rn are written in it, rarely came across swift implementations.

Thread Thread
mjmaix profile image
MJ Abadilla

Thank you Kyle!

Collapse
hmmka profile image
Hmmka • Edited

Hi Kyle,

I have TV-screen where we simply run our web-app on react. I have found out that fps starts slowly go down after ~10-15 minutes. It can loose 5-7fps per hour. App starts with 58fps and goes down to 52fps in one hour.

I had a test where I have webpack + App which renders empty div. This simple app starts to loose fps in 10 minutes after launch.

Is react suitable for apps which suppose to run without clicks and refreshes for hours? (is it problem of my app or the problem of react? Is there anything what could help me?

My backup plan is to refresh the page every hour, but I am looking for a better solution.

BR,
Julia

Collapse
kylessg profile image
Kyle Johnson Ask Me Anything

Hey Julia, although this is more of a react than react native question I’ll see if I can help point you in the right direction. This definitely seems quite unusual and isn’t standard for react to see this.

To me it sounds like some form of leak, e.g registering event listeners that don’t get unassigned, or some recursive hell. Did you try compiling your app in production mode and running the output with a simple http-server? Also, have you tried running in chrome and inspecting memory and cpu usage?

Collapse
hmmka profile image
Hmmka

I have tests not only on dev but also on production of other product, which has the same results. FPS slowly goes down in some time.
This is why I raised the question if react suits for such products.

Probably, there is a problem in a set-up somewhere and react is not involved in the problem at all.

Collapse
engineercoding profile image
Wesley Ameling

What is the major benefit over React (web)? Of course for apps where you need access to the users music for a music player it makes sense, but for festivals for example a web app app should be sufficient.

Collapse
kylessg profile image
Kyle Johnson Ask Me Anything • Edited

It ended up being an amazing app store SEO hack, a lot of the time we were the top search result for x festival - that's a lot harder to achieve on a website.

Also, quite simply, people take their phones to a festival not their laptop. This worked offline and tapped into things that only fit well on an app (e.g. find my tent, chat with image upload). It was definitely a lot easier to compete against the official app than website.

Collapse
dechamp profile image
DeChamp

I'm working on my second app now, but this will be the first one I release. My biggest fear going in to this is not building that app, but the red tape of getting it published. With that being said, my questions are.

  • What should I be prepared for when going to publish my app?
  • What can I do to help avoid headaches during the process?
  • How hard much harder is it, to publish both Android and IOS, vs just IOS?
Collapse
kylessg profile image
Kyle Johnson Ask Me Anything • Edited

Good question and congrats :).

How hard much harder is it, to publish both Android and IOS, vs just IOS?

To get the last question out of the way, I'd say if you face any red tape it's almost certainly going to be on iOS side. Also the time bottleneck is going to be iOS side too, publishing can take 1-2 days but sometimes more.

What should I be prepared for when publishing my app?

I can't give you a simple one sized fits all answer here, but I would say that as long as you're not doing something outrageous you'll probably be ok. Best thing I can do is list some of the common scenarios I've found that might catch you out:

  • If you're using media that's subject to copyright you may need to prove you have rights to use it (we had to prove we had rights from opta for developing dugout FC)
  • If you're using chat (particularly anonymous), you'll need a way for users to report people and block people.
  • If you're developing an app for a client who has a registered organisation you need to make them register their own iTunes connect account with their iban, don't try to use your own.
  • Your app needs to have a functional use and can't be purely informational.
  • Your app needs to be useful in someway shape or form for anyone that could come across it, not just specific users (e.g. invitation only)
  • If you're attempting to white label an app, iOS state there needs to be a functional difference and not just informational.

With the above being said it literally depends sometimes on who views it.

What can I do to help avoid headaches during the process?

  • Put the app through the review process early for iOS, if you check the option for manual release you could just leave it there and keep developing.
  • Get all of your metadata early. There are tools for generating all sized icons, take screenshots of the app in the biggest iPad and iphone, you'll need these to submit, iTunes connect can now auto resize to smaller devices.
Collapse
dechamp profile image
DeChamp

You rock and that was greatly informative. Thank you so much.

Thread Thread
kylessg profile image
Kyle Johnson Ask Me Anything

That's alright, enjoying all these questions!

Collapse
parth3724 profile image
parth3724

As shown in here (youtube.com/watch?v=0MlT74erp60&fe...), I need CPU profiling for react-native javascript code.

So can you please explain/guide me to tutorial for profiling javascript code?

Collapse
kylessg profile image
Kyle Johnson Ask Me Anything • Edited

Apologies, I don’t have much to share around this. Though I’m sure there’s plenty of resources out there for this.

Collapse
jackneedham profile image
Jack-Needham

Hi There, we have built an app in React Native and have released it on IOS and Andriod. We have had reports of the white screen of death on IOS devices and so far only on iPhone 8s. The white screen appears not on the home screen or after splash screen but when taking steps beyond the home screen.

We have no issues on the simulator and therefore it is really hard to track an find. Let us know if you have any tips or start points?

Collapse
kylessg profile image
Kyle Johnson Ask Me Anything

Hey, unfortunately I can safely say I haven’t come across a white screen issue on any of the apps I’ve made. The only thing close is at the start screen where either the app is not registered or the packager is having issues.

Collapse
256hz profile image
Abe Dolinger

Very late to this post, but best I can suggest is to get the phone and build/ run the app from xcode. You will typically get much better errors than the command line.

Collapse
elijahcorleone profile image
£.j

How do you handle Keyboard hiding inputs ?

Collapse
kylessg profile image
Kyle Johnson Ask Me Anything • Edited

It's a bloody pain!

I think I've got a post somewhere in GitHub saying this is the biggest pain point at the moment with core React Native, and I posted that in 2017 github.com/facebook/react-native/i....

I just use a combination of the keyboard avoiding view and react-native-keyboard-aware-scroll-view, I've always been able to achieve what I want but it's always fiddly.

Collapse
dimpiax profile image
Dmytro Pylypenko

Emotions:

Sounds fantastik! This is your glory day, horray!
Each 10th day – new app!
I would like to give you 100 hundred copy-pasted emoji beer.

Question:

What is percentage of bridging to native modules?

Collapse
kylessg profile image
Kyle Johnson Ask Me Anything

Low, less than 10% maybe, but I've worked on some weird projects. There's so many repos now on GitHub when comparing to 2015.

Here are the times I've had to delve into native modules.

  1. Fixing bugs in existing libs (e.g. react-native-navigation)
  2. Developing an app that integrates to a car HUD (Had the innards of a car on my desk for months)
  3. Writing a bridge that integrated with a custom bit of hardware we produced base on particle.io/
  4. Writing an iOS native keyboard extension (there wasn't a good project that existed, I guess it's not a common use-case)
  5. Writing an android module that talked connected to a hotel router.
Collapse
dimpiax profile image
Dmytro Pylypenko

Was anything except Keyboard Extension on iOS? For example connection ABAddressBook written on ObjectiveC.

Interesting your integration approach with CoreML for example.

Thread Thread
kylessg profile image
Kyle Johnson Ask Me Anything

All the above required me to write ObjC. The HUD app in particular required me to bridge a pretty beefy SDK that was pretty closed off to the public.

I haven't integrated with core ml, I do want to play around with using tensorflow and React Native at some point.

Collapse
northbear profile image
northbear

Ok, I'll keep in mind... Thanks...

Collapse
kylessg profile image
Collapse
wathsara profile image
Wathsara

I am implementing a app using expo. But now i need to add a image recognition part to my app and i used the tensorflow for that. But it cannot be done with the expo. So do you have any solution rather than ejecting the app. I mean like to use the Firebase mlkit without using tensorflow or something like that.?

Collapse
lil_starlight profile image
ais

how can software engineer make a difference in a country?

Collapse
amaslakov profile image
Aleksei Maslakov

Hi, Kyle!

Is it possible to write a React Native app that would turn on an alarm (play some sound) in response to a push notification (or some other sort of push). I want a node js server to be able to wake me at night on certain events, but a standard push notification is not enough =) An alarm clock would be okay. I never wrote anything with React Native, so I'd like to first find out if that's feasible =) Thank you!

Collapse
josephting profile image
Joseph Ting

Do you think React Native is a good starting point for someone who is a beginner in mobile apps development i.e. never touched Android studio, Java or Kotlin & Objective C or Swift for iOS; but has web development experience?

If so, do you think one would miss out on anything say difficulty in debugging or finding out root cause of a certain issue reported by users should one not having any experience in pure mobile apps development?

Collapse
kylessg profile image
Kyle Johnson Ask Me Anything

It’s absolutely a good starting place! I started in the same situation apart from knowning java at the time.

Debugging I guess can be a bit slower than web depending on what you’re dealing with(e.g native level crashes), having said that the tooling is still very good. For debugging issues faced by users, using a combination of crashlytics and source maps can work really well.

Collapse
donghoon759 profile image
Donghoon Song

Hello. I want to save my images on cloud drives(Google drive, dropbox...) with react-native app. I can't find out the exact way. I don't know which package I should use. What I have tried is getting auth but I can't understand how it works and how to manage my key or status. Can you give me any advice? Thank you for reading.

Collapse
jalson1982 profile image
Jalson1982

Hello mate. We are building app that will communicate with ble devices. Issue is that we need to have both ios and android app wake up almost all time because when we enter in ble range app should connect on ble bluetooth device. Any idea how to manage background workers that will work on both platforms and keep app wake up?

Collapse
zonayedpca profile image
Zonayed Ahmed

Can you help me to automate all kinds of task from building to releasing app to the store in React Native? I prefer circle ci or same kind of provider with good User Interface. I am looking for Continous Integration as well as Continous Development using React Native

Collapse
prettydev profile image
Max

How to write background push notification functions without using google service?
Now I'm developing china's service, and It's a really difficult problem for me.
Background push notifications must run in android and ios.
Could you give me any advice?

Collapse
simaattar profile image
simaattar • Edited

Hey,
How can I run a code when app is closed ? is it possible at all?
I need to be able to write in a file every 10 seconds, say I need to write the current timestamp. How should I do this?
Thanks!

Collapse
ardn92 profile image
ardn92

Is there a fast photo capturing library for react native?! I've used react-native-camera but it takes up to 1 second or more to take a photo(even with: preprocessing, exif and rotation options set to false). But there are tons of android java applications which take photos way faster.

Collapse
ajinspiro profile image
Arun Kumar

Hi,
I'm a very angulary .Net developer (please don't be mad :) ), with very little knowledge about mobile app development. Now I have to make an app and I'm very confused about choosing whether to go with angular-nativescript or ionic or react-native. I have zero knowledge of react library. The app I need to make is a simple one having a member registration/login/dashboard. I'm really excited and scared because I need to complete this with a deadline. Which one should i choose.

Collapse
kylessg profile image
Kyle Johnson Ask Me Anything

That’s a tough one considering the deadline, may be the one time I’d say with stick with what you know assuming angular-nativescript can give you the outcome you want.

You aren’t going to get native ui components with the other two, but it’ll get the job done I’m sure.

Collapse
salman__bukhari profile image
Salman

Hey Kyle, we have a react native app with react navigation and when its left for a while with the app in the background some of the variable values get lost such as static variable values (part of a class which is instantiated in root of the app). These values contain important stuff such as token and refresh token of the app. Do you know why this happens? Only happens when the app is left for a day.

Collapse
arungopan profile image
Arungopan Gopakumar

Hey I am currently working in REACT NATIVE project. Our team is using Sectionlist component and we would like to implement drag / drop functionality with section. I need to move items from one section to be other using drag / drop. I was able to make the items draggable by using panresponder api. But how to get the reference of drop zone ? When the item is dropped, I need to know to which section I have dropped the item. Can you please share your thoughts on the same.

Collapse
fissben profile image
fissben

Hi there,

Did u ever faced with a problem, where app is "almost" not responding to bottom touches ? It's appears only on xiaomi devices with gestures layout enabled(no bottom android navigation) on android 7+.
Area of 40-50px height from the bottom is "hardly" responding (1 of 10) to the touches, while slides(left->right and vise-verse) working properly.

Collapse
aditya1501 profile image
aditya1501 • Edited

I have build a deep learning model of image classifier. I want to build an expo app which could take a photo and geolocation. this image should be predicted through deep learning model. And the result should be displayed on screen. I have no experience in app development and read documentation and watched videos but not able to get my answer.I don't even know whether using expo will help or not.

Collapse
elijahcorleone profile image
£.j

Also do you have any tutorials you could point out to building react native bridges and projects which android native requires libraries written in C

Collapse
kylessg profile image
Kyle Johnson Ask Me Anything

I don't, and to be honest I've always been out of my comfort zone doing it. Ironically, as a result, I'm more comfortable reading ObjC than Java as I've bridged more in iOS even though I spent the first 2 years professionally writing Java.

I'd love (if I had the time) to progress more in native development, I think it'd be the thing that'd help me become a better React Native developer. Realistically you can achieve absolutely anything so long as you have the Native Code to back it up.

Collapse
phsantiago profile image
Pedro H. Santiago

How we can get a better debugging experience? When I was trying to develop some React Native apps and has an error, the stack trace were so confusing. There is a way to have a great debugging session with breakpoints, watches... and don't need to keep changing our code until it works?

Collapse
kylessg profile image
Kyle Johnson Ask Me Anything

I guess it depends where the error sits, some errors are hard to debug yes , either errors in the render markup itself or in native modules.

However I would say apart from that it's pretty much like debugging any web app in chrome with watches and other stuff you mention. I'd even go as far as to say developing with hot reloading is better than the react/webpack equivalent.

Collapse
antonfrattaroli profile image
Anton Frattaroli

What's your experience (if any) been like with RN-web?

We're considering rewriting an existing hybrid app to RN w/web, uses camera but no other hardware. I read above that you wouldn't recommend create-react-natve-app? For first timers, would you recommend using that, then when comfortable rewriting instead of ejecting?

Thanks!

Collapse
kylessg profile image
Kyle Johnson Ask Me Anything • Edited

I haven't used it. I love the idea of sharing web code with react native, but I don't think that idea should go as far as to share dumb components so I probably wouldn't use it. I haven't gone through the process of ejecting an app but I've been told it's really painful, but it's probably not quite as bad as rewriting from scratch.

Sharing code with web was what got me into react native in the first place, I don't think that benefit is talked about enough.

Collapse
amirghazizadeh profile image
AmirGhazizadeh

Hi Kyle, I'm new with RN and am developing now for 1 month. I was wondering if you could help me out on which version of RN is the most compatible version for app release and fewer errors, cause I've faced errors that made me downgrade a lot. Thank you so much for your attention.

Collapse
kidfrom profile image
kidfrom • Edited

What do you think of building a RN app which use Bluetooth Classic and play async (from an API) audio while the app on the background state?

Most of the hardware will only have a 1GB of RAM and use Android 6.

To be clear, I am building a Push To Talk app.

Collapse
nihp profile image
nihp

Hi Kyle JohnSon,

I would like to know how the background invite message will be sent in react-native?

I have used react-native-message-composer package. But it only works for iOS. But need the same for android as well.

Did you know any other packages?

Collapse
hali241997 profile image
Hasnain Ali

Hello, I need some help. I'm trying to implement autocomplete text view in react native. I've narrowed it down to some easy ways. I'm using Input from react-native-elements for typing text and I've added a FlatList right below it and it only shows up when either I enter some text or click on an icon (that is added to the right of the input). I also had some elements below the input and I wanted then to not scroll down as soon as the flatlist loads. I accomplished it by positioning the flatlist to absolute and setting the left, right and top property. Moreover, I wanted to fix the height of the flatlist, which I did with the height property in the style prop of the flatlist. The only problem I'm facing here is the scrolling problem. I can't seem to scroll now in android. I still can scroll in iPhone, but not on android.

I can also give some sample code to it. Can you show me where I am going wrong?

Collapse
tauhidalmahfuz profile image
Tauhid Al Mahfuz Tusar

-> My source uri ImagebackGround is not loading in released apk on some latest devices(Notched, Curved).
-> Running absolutely fine when i build it on device. I am using ImagebackGround inside a card of native-base.
-> My source uri is a coming from REST API JSON.

Please help.
Thank you.

Collapse
ddashko profile image
ddashko

Hey Kyle! I really need your advice because you're using react-native-navigation. I used RNN v2 in my first RN project and almost in the end I am having huge troubles integrating it with push notifications. It seems absolutely not convenient and buggy with very sparse documentation. Already tried react-native-fcm and wix own thing react-native-notifications. Having issues making to to play nicely. besides that on Android RNN restarts the whole app when you click on notification in the tray. Could you please tell what package do you use for notifications and possibly point to some great examples of making that work togather on both platforms?

Collapse
kushagra21 profile image
Kushagra Sinha

Hi Kyle,

I'm supposed to develop an RN application with location tracking (foreground,background & killed state). The feature works well with standard android os's, but fails in chinese manufactured devices like Xiaomi ,OnePlus etc. I've tried various libraries and workarounds but nothing worked perfectly.

Can you suggest something on this ?

Collapse
ben profile image
Ben Halpern

How many of them do you actively maintain?

Can you give a few examples of some of them?

Collapse
kylessg profile image
Kyle Johnson Ask Me Anything • Edited

Only a handful, which is a bit annoying because my xcode organiser / itunes connect etc ends up looking like this :D. prntscr.com/klu0jm

A lot of them have been released for a temporary period, due to them being PoC's or only having a limited shelf life (e.g. my festival apps). Other's just get taken over by other people post MVP.

A few that I'm maintaining, I'll add to this list in the coming weeks too if there's appetite :)

Collapse
ksports profile image
ksports

I am trying to get react-native-navigation and react-native-firebase to work together. I'm fairly new to programming and I'm having trouble getting them to build. I have seperately loaded react-native-navigation with react native version 0.56 and have used the starter program for react-native-firebase but not together. How do a build them together with react-native verison 0.58?

Collapse
danzheng1993 profile image
Daniel Zheng • Edited

Hi Kyle,

I have some weird issue with keyboard and scrollview.
I am using KeyboardAvoidingView and KeyboardAwareScrollview components to handle the keyboard.
The case is that when the keyboard get opens the cpu goes nuts.
Do you have any suggestion for this issue?
thepracticaldev.s3.amazonaws.com/i...

Collapse
insomniac807 profile image
Philip Butler

let string = "alert('injection success'); var data = "+this.state.data;
this.webview.current.injectJavaScript(string);

Why is it that the alert runs fine but I cant access the variable data from the html template being rendered by the webview?

I try to call it in the script tag like this

document.addEventListener("DOMContentLoaded", function(event) {
alert(data);
});

Collapse
ioness profile image
ioness

Hello Kyle

I develop a web, I have to obfuscate the js but with React Native I don't know what happens...

Once I publish an app, will everyone have access to my javascript in plain text, without obfuscation ?

By the way, I am using managed expo, this is my first MVP and I come from web.

Collapse
jatinaroragit profile image
Jatin Arora

Hey there,
I am a student and have to complete a project in next 6 months. The project aims build a Recipes application.
Should I use react native to build an iOS app, Android App and a website ?
I have no access to any computer running mac os to use XCode.
Thanks.

Collapse
dianamakarevich profile image
Diana Makarevich

Hello! I'm developing react native application with expo and I have very strange bug. When I add new images, they are showing in my simulator and real device when I open it local, but when I'm publish project in expo.io, and after that when I open it in expo, new images are missing. But old images are showing! I use Image and Animation.Image from react-native. When I add new svg images in SvgUri component, it's reproduce too..

example of my code:

it's worked:

example of my code:

it's dont work:

Please, help me
Thanks a lot

Collapse
kylessg profile image
Kyle Johnson Ask Me Anything

I really can't help you here, sorry. I don't / will not use Expo - it sounds quite specific to Expo.

Collapse
bosschaertb profile image
Benoit Bosschaert

Hi I'm diving into an already existing react native project, which hold a ± of 100.000 users. For now it's quite static and I was asked to add more delight and interaction to the app. On my research for this I stumbled onto the Lottie library, integrated into react-native. I tested it on my virtual machine and it looks amazing. But I have some questions though:

  1. Is it stable to use in real life products?

  2. Are there do's and don'ts for the use of this library? (like 'Use it for buttons, but definitely don't use it for...)

  3. When using this in live projects, did you often have performance issues?

If you find the time I'd love it if you could enlighten me on this. :D

Have a nice day!

Collapse
kylessg profile image
Kyle Johnson Ask Me Anything

TD: I mainly focus on functionality and leave interaction design to colleagues. However I consistently use Lottie in production.

  1. Yeah, the bridge is quite slim and regular Lottie is solid.
  2. The limitation I guess comes down to the fact that it's compiled down to JSON. Technically you can edit this JSON in realtime to adjust colours (I've done this for example with loaders that needed dynamic colours). It's mainly that it'd be tedious to build big customisable components when you're using minified JSON as the animation.
  3. No.
Collapse
mdeepika029 profile image
mdeepika029

Hey Kyle!!! I am new to react native and i am trying to work on user location tracking and sending it to another user. since i am new to react native and fire base i am facing problem to initiate. So, can you help me with this and say what to do?

Collapse
aarondrs profile image
Aaron Rodríguez

Hi Kyle well done. so many projects. I'm worried about the performance for huge sets of data. How did you handle that? I would like to know your thoughts.

Thanks.

Collapse
kylessg profile image
Kyle Johnson Ask Me Anything • Edited

The performance of what with huge datasets though? I guess the main thing you'll want to be worried about when dealing with large amounts of data is how you're rendering it.

In which case, I'd say as long as you're virtualizing the rendered data (i.e. using FlatList or something similar) you'll be fine.

That being said, if you're worried, write a mock test against said data!

Collapse
aarondrs profile image
Aaron Rodríguez

Hi Kyle, you were right. Just using some components and applying best practices in general we can have a good performance.

Thanks a lot.

Collapse
tux0r profile image
tux0r

Why? Are they all useful?

Collapse
kylessg profile image
Kyle Johnson Ask Me Anything • Edited

They range quite drastically.

A lot of them were festival apps, they totalled around 200k downloads, not the most useful app but had a large, temporary influx of users. Around 5 of them achieved top 10 in the iOS music category.

On the other hand, one of the more useful ones of mine is Patient View, this probably the proudest points as a developer as I could literally see it helping people with people's illnesses on their day to day life
facebook.com/patientview/posts/207....

I've developed quite a few apps for startups too, definitely helps out people with tight budgets who can't afford two native developers and a website developer.

Collapse
imben1109 profile image
Ben

How do you cost the application?

Collapse
kylessg profile image
Kyle Johnson Ask Me Anything

We started out costing an iOS build and then adding like 20-30 % at the end for an Android build. However now because of the parity in React Native they can now be costed as 1 build. It's not hard anymore to keep things consistent between platforms IMO.

There might be flat costs for things like getting iTunes to connect and play store builds up and running and maybe doing a sweep through on Android and iOS to ensure consistency.

Apart from that, pretty much no different to how I cost for the web. This might be a bit out of scope for the AMA but here's the high level:

  • Depending on the project might start with very quick PoC to test things are feasible or further research into how the industry works and if we are likely to run into any issues that could affect cost.

  • Add high-level estimates for "epics" based with cost being time estimated, contingency assessment on some of the more unknowns which might add a 10-20%.

  • With the help of the client, break those stories down into more detail and organise into sprints of work, then work/charge on an agile basis from there.

Collapse
sandeepsharma27 profile image
sandeepsharma27

i want to implement ML with react-native, there are some packages that uses Tensorflow but they all have some open issues that need to be resolved. Need some guidance from where i start. I don't know anything about Android and Swift but do know about react-native.

Collapse
aswathm78 profile image
Aswath KNM

What are most used react-native plugins in your apps?

What do you use for mobile backend ?

Collapse
kylessg profile image
Kyle Johnson Ask Me Anything • Edited

I've gone from having a big boilerplate with having everything I could want (e.g. camera support, contact lookup) to stripping back to what I'd use 90% of the time. It's easy enough to add modules when you want them now with react-native link.

This is what I'd consider core:

    "react-native-animatable"
    "react-native-bottomsheet",
    "react-native-branch",
    "react-native-device-info",
    "react-native-fabric",
    "react-native-fabric-crashlytics",
    "react-native-firebase",
    "react-native-globals",
    "react-native-interactable",
    "react-native-linear-gradient",
    "react-native-navigation",
    "react-native-vector-icons"

The rest is down to if I'd need it, charts, contacts etc generally all have libs nowadays.

By mobile backend do you mean what server? That totally depends on what the project is, maybe sometimes I (or maybe even sometimes the company I work for) wouldn't even have a choice on this.

If it were me developing on my own though it'd be node.

Collapse
alienviii profile image
Min

I'm doing a streaming app by RN so what do you think about watcher counter when streaming? I want to track that on app caus I'm afraid that the server gonna lag whenever streaming start. And when I check in app, when the start signal from server come, the counter will be 1 only caus it write to server as same time :( I'm so sorry about my English. Pls show me the light :v

Collapse
kylessg profile image
Kyle Johnson Ask Me Anything • Edited

This isn't much of a react native question, but ok :D. A watcher counter would only work for 1 user vs if you're intended on doing it clientside.

Have you considered using firebase for this? Sounds like a good usecase, plus internally it'd cache it for offline use.

Collapse
bytegasm profile image
Bytegasm!

Where do you think react-native is headed in the coming years? Do you n think it's evolving at the same pace as the native counterparts?

Collapse
kylessg profile image
Kyle Johnson Ask Me Anything

The biggest changes I've seen with React Native is the introduction of bigger native bridges. Proper native modules like react-native-navigation and react-native-charts-wrapper are basically making it so apps can be made to be completely indistinguishable from their native counterparts. So hopefully, assuming the community stays massive it means more of that.

I can see it easily becoming the de facto tech choice for startups. Having said that I think we'll also see React Native used more and more for parts of existing native apps that (e.g. some screens) as an attempt to gain cross platform sharing without rewriting whole apps.

Collapse
deepslam profile image
Dmitry Ivanov

What do you think about React Native after all?
How many issues have you faced with React Native?

Collapse
elaziziyoussouf profile image
Collapse
kylessg profile image
Collapse
bocanceaionut profile image
Bocancea Ionut • Edited

Hello. My app works fine on a simulator but crashes when I release it in testflight.
Libraries that I use:
-react-native-config@1.3.3
-@react-native-community/google-signin@3.0.3
Those are relevant and you will understand why.
I followed advice from the internet and changed the scheme to 'release'. And I get this error at this line after adding a breakpoint:
line: [[GIDSignIn sharedInstance] restorePreviousSignIn]; in RNGoogleSignin.m
error: Thread 1: "You must specify |clientID| for |GIDSignIn|"

Extra, I submitted the crash from testflight and I opened it with Xcode. I get the error at the same line but different texting: Last Exception Backtrace (0)

I need to mention that I pass the clientId using react-native-config library.

Can you help me? :)

Regards.

Late edit: I use Xcode12 and react-native v0.63.3

Collapse
adamthewizard profile image
Adam

That's a crazy work rate! Well done, man! Do you see yourself producing a similar amount over the next 3 years or will you be aiming to slow down at all? ✌🏻

Collapse
kylessg profile image
Kyle Johnson Ask Me Anything

There's always more side projects! :). The company I work for has definitely focused more towards making mobile apps so there will be plenty more to come!

Collapse
amankumarsingh01 profile image
Aman Kumar Singh

I am a beginner, i created a simple weather app and it turned out to be of 60 mb, any suggestion for minification.

Lately i am working on another project the app is slow i am using expo, can you give suggestion how shall i make it robust.

Collapse
mjmaix profile image
MJ Abadilla

How do you manage your environment variables? I find react-native-config too complicated, I had to do a lot of complicated stuff make it work with Fastlane.

Collapse
jabary profile image
Mohammed Jabari

For someone with a good background in Android Native development, does it worth the hassle to learn React Native or just learn Native IOS development?

Collapse
kylessg profile image
Kyle Johnson Ask Me Anything

React Native's benefits come into play when you start sharing across platforms (including sharing react native codebases with web), and being able to develop on a codebase where web developers could easily get onboard. That being said, I guess it comes down to how you'd find the learning curve of each. If you're not savvy with JS and don't want to reach the point of having a shared codebase with Android, maybe go with Native.

A side note on this, I think there's a real untapped opportunity for native developers to work with React Native developers to build out the box native components that perhaps they use as a toolbelt to make cross platform apps way more efficiently but perhaps offer a bit more fidelity than most React Native Apps.

Collapse
aoreclause profile image
Emmanuel Oreoluwa

I recently started using react native
Am developing a dating app and confused should I use node Js or Firebase for backend

Collapse
aryanavya profile image
aryanavya

I have issues, with the release apk on some devices, when we redirect to another app and comes back to our app gets restart

Collapse
000xuandu profile image
Le Xuan Du

Perhaps you have experience with font size handling for all different devices?
I am in need of advice on how to do that.

Collapse
amkaub profile image
amkaub

after release apk when app start show blank screen on some android phones. How to fix it?

Collapse
jemyknd profile image
jemyknd

hello
how do you use react-native-firebase without expo
the process of integrating it with android

Collapse
kylessg profile image
Kyle Johnson Ask Me Anything

Hey guys, I'll try and find some free time to answer these remaining questions! I have been reading them so don't worry.

Collapse
aissabouguern profile image
Aissa BOUGUERN

What you can say about upgrading React Native Apps ? I hear that it is sometimes painful to upgrade to a newest RN version, in comparaison with other frameworks like Flutter.

Collapse
jackbitthehe profile image
jackbitthehe

Hello,
I am wondering to do you add your Expo app to the "open share list"?
Thank you!

Collapse
fultonbrowne profile image
Fulton Browne

how much time do you have? you must 25 to 28 hour days.

Collapse
divyakorukanti profile image
Divya Korukanti

Hi kyle..

I am working with react-native-cli project.I want to know is firebase.js is compatable or react-native-firebase is compatable please let me know

Collapse
zonayedpca profile image
Zonayed Ahmed

And the second question, Can we actually make a widget of an application that is built using React Native? If yes, then how can we do that effectively? Do we have any limitation here?

Collapse
justinctlam profile image
Justin Lam

How well do your apps scale? Have you read about AirBnB's use of React Native and their decision to not use it any more?

medium.com/airbnb-engineering/suns...

Collapse
kylessg profile image
Kyle Johnson Ask Me Anything

I have yes, I feel like a lot of their challenges were quite specific to their company. I work for an agency where the benefits of cross platform development have made a huge impact for them and businesses we've made apps for.

Collapse
mtabishs profile image
mtabishs

I want to create a custom keyboard in react native for my app. Couldn't find a way to do it. If you can provide a guide for this. It will be appreciated.

Collapse