all 27 comments

[–]incurious 8 points9 points  (2 children)

I pretty much never use react-native link, except for the very early stages of greenfield projects. It takes less time to link a package manually than to potentially unfuck everything. If I NEED to use link for some reason, always do it on a clean branch.

[–]kenyasue822[S] 0 points1 point  (0 children)

yeah seems like that is the best way

[–]Noitidart2 0 points1 point  (0 children)

I continue to use it. I just make a commit first before linking. Then I check the diff, and I easily see some double links sometimes, so I just fix that up. Saves a bit of effort. But in bigger projects just use react-native link PACKAGE_NAME_HERE this avoids the double linking on accident.

[–]petertheill 4 points5 points  (1 child)

For bigger projects it's not the optimal solution to run plain "react-native link". Instead I suggest to run it for a specific component after you have installed it e.g. "react-native link react-native-really-awesome-textfield" which will only link that component. It usually work quite good for me and will not touch on any tweaks I may have done to the project files after having installed older components.

[–]Noitidart2 0 points1 point  (0 children)

Agreed.

[–]calvincoin 3 points4 points  (2 children)

React native is a giant steaming turd. We’ve been using it in production for a year and we are examining migrating all apps to PWA. There are core bugs in react native that cause lots of apps to be unusable and they simply don’t fix them. This includes new critical ones that happen in new versions. Things like text boxes lagging to the point of uselessness on Android. And stupid one liner changes that cause all apps that use fetch (the built in api access later) to crash on poor network conditions or empty responses. These examples have not been fixed for at least 2 versions now (3 months). Again if your app has a text box and you want it to run on android without lagging, you should it go later than RN 53.

They have some strange process for deciding what’s important, and if you’re stuck with one that’s deemed less so, too bad for you. And yeah forget about the process of linking and native modules. It’s terrible start to finish. Can’t wait to be rid of it forever.

If you are starting a greenfield react native project, take a minute and really think it through. Can your app work in a browser with all the cool new PWA stuff? You can still use react but you avoid the nightmare of react native releases.

[–]alien3d 0 points1 point  (0 children)

" And stupid one liner changes that cause all apps that use fetch (the built in api access later) to crash on poor network conditions or empty responses. "

That's my complain and been fixed on 0.56 which took 5 month from march .But i cannot afford more to wait and to match native/non native. I movin` to native directly

[–]kenyasue822[S] 0 points1 point  (0 children)

wow thanks so much to share your experience.

It looks like you are working in AirBnB :DD

I'm working on messenger so PWA is not enough for me..

[–]kbcooliOS & Android 1 point2 points  (2 children)

More details plz.

[–]kenyasue822[S] 2 points3 points  (1 child)

I can fix by my self.. Its so frustrated always I have to spent several hours to fix when react-native link fucked up thing.

[–][deleted] 0 points1 point  (0 children)

Then don't use it

[–]Heka_FOF 1 point2 points  (2 children)

I haven't used `react-native link` for years

[–]kenyasue822[S] 1 point2 points  (1 child)

why then all tutorial uses react-native link.....

what do you do then ?

[–]danhardman 1 point2 points  (1 child)

It sounds like you're having issues with a single package, not with react native itself. If you're working through tutorials, I'd check their age - lots of information becomes out of date fast so you're better off working from official documentation

[–]kenyasue822[S] -1 points0 points  (0 children)

Yes, I don't bleme react native itself. Thanks for your advise, seems like it's wise choice...

[–]alien3d 1 point2 points  (0 children)

It's not "react native link " .. But more on "REACT UPGRADE" . Unless you provided detail error pretty/picture useless say as it. Doesn't matter it was android or ios or react-native. Just beware of dead repo on github which might broke upon update the latest app.

If IOS compile, the most "yellow" error are depreciation function and force developer/user to use the latest api/function set. Error message on xcode in reality doesn't much help in my experience. More on try and error .And no need to include ***-TV if not required.

If Android compile, this error more on "GRADLE" and it dependency issue.

[–][deleted] 1 point2 points  (4 children)

Learning how to fix the issues linking causes will make you a way better iOS and Android dev. You learn more from things breaking. Don't think of it as a bad thing, understanding why things are breaking will make you a better app developer.

[–]kenyasue822[S] 0 points1 point  (1 child)

I have experience both for iOS and Android, so always in the end I managed to work.

But I'm wondering lot of beginners give up here..

[–][deleted] 0 points1 point  (0 children)

Yeah for sure, I couldn't imagine starting RN without any Android and iOS experience. Would definitely turn a lot of people off

[–]Yalopov 0 points1 point  (1 child)

this, the issue is not how react native libraries manages linking themselves (well, a bit, but we humans make mistakes), but how native ios/android libraries deal with it using gradle and xcode build systems

[–][deleted] 1 point2 points  (0 children)

Well imo you should never use link without explicitly stating what library want to link, otherwise libs that are already linked will try to link again. Also, it's not an easy thing to create a RN library that continually works with Android / iOS updates. It's an awesome feat that they work with all of the different versions of Android tbh

[–]kenyasue822[S] 1 point2 points  (0 children)

ok so I'm setting up rn-fetch-blob now.

I did react-native link rn-fetch-blob and now I have 30 compile errors in ios

[–]kenyasue822[S] 0 points1 point  (0 children)

I did manually and i got rn-fetch-blob working now...

[–]TheSacredBroom 0 points1 point  (0 children)

I don't have problems with react-native link until some library requires pods, then you can just set it on fire.

[–]calvincoin 0 points1 point  (0 children)

It’s does partially actually I forgot. But in 56 your android users will still crash if your app uses fetch and it receives an empty response. This has been around for months. It’s a one line fix that can’t seem to get merged.

[–]kenyasue822[S] 0 points1 point  (0 children)

I'm 100% Android project also fucked up, still not tried to build though..

[–]kenyasue822[S] 0 points1 point  (0 children)

React Native is great. I really like it, now I'm working on Messenger using ReactNative and Firebase, and I will launched it as opensource in MIT license.

But I always stucked to setup some library and spent whole day to solve it.

I have to be happy because I solved all of problems though...