That is how you do it! In fact, there really isn't another way--there's no built-in update mechanism (yet?), and if you create an entirely new app with this code, Hubitat won't associate the new code with your existing app, in the event it even lets you install two with the same name in the same namepsace.
Oh, and some apps won't work properly until you at least re-open the installed app itself and hit "Done" afterwards, depending on what code changes the developer made and how careful they were to preserve existing setups. You usually don't need to do this, however.