New to app updating and debugging deprecated code, what is the best thought process for making changes and updates?

Viewed 94

I am extremely new to mobile developing and have recently been put in charge of updating a React-Native app using Expo, that hasn't been touched in about 18 months.

I am familiar with creating web applications or websites from scratch and thinking about debugging from a creation standpoint with updated code that is not deprecated but the idea of updating old code is foreign to me. Can someone help share their thought process when it comes to this?

The mobile app itself runs alright - crashes and malfunctions from time to time.

Is the idea to go in and see what code is deprecated and which dependencies need to be updated? And/Or is the idea to try and find what is making the code crash and malfunction and leave deprecated code and old dependencies?

Thanks for your patience with what seems like a silly question.

1 Answers

And/Or is the idea to try and find what is making the code crash and malfunction and leave deprecated code and old dependencies?

It is typically recommended that crashes and malfunctions should be resolved before updating libraries. Some libraries may introduce further crashes and errors after upgrade due to breaking changes and deprecation. As such it would be difficult to separate code bugs from errors caused by library upgrades.

If some of the bugs and crashes cannot be resolved without library update, then fix as much as you can before updating the library.

Is the idea to go in and see what code is deprecated and which dependencies need to be updated?

This question is subjective. It depends on how much time can be spared for the upgrade process. Obviously, updating libraries can have other small benefits like improving performance or reducing code size etc, but if a library that is used extensively in code (eg. react-navigation) has not been updated for many major releases then update/ refactor and testing will take a long time and may not be worth the time if nothing is broken.

Furthermore, it is easier to update libraries regularly and frequently rather than wait for the current version to be deprecated. This way, we avoid having to deal with tons of breaking changes in one go.

Related