Best practices for maintaining custom JavaScript code

We have a growing eco-system of custom Javascript-code, mostly for building graphs in our UI. Our different code blocks typically contain a large amount of code duplication, but cannot be directly consolidated due to small nuances which we currently handle by flags and Visibility Groups. Thus, maintenance grows significantly in complexity as the number of Coded Components grow.

Ideally, we would be able to keep all our reusable code in some git-backed library and import into the Coded Components, but as far as I know there is no functionality for that available.

Does anybody have some experience to share with regards to this? Do you try to consolidate code into large files and handle conditionals inside the code, or do you have many small code blocks controlled by Visibility Groups? Do you source control in a separate git-repo and copy-paste into Appfarm?

Any opinion is highly appreciated!


Thank you for your bringing this up! We are aware of this challenge and have it registered internally. However, it is not prioritized on our roadmap at the moment.

We do appreciate your feedback. If you have additional context or wishes that would be useful for us to understand, we would be happy to consider them in the future.

Nikoline
Appfarm