top of page

Bundling your Wix collection code for easier management

Today I want to share a quick tip to keep our code neat & clean when working with Velo files such as data.js and events.js. This is especially important when building a large app on Wix.

As you know, data.js is a system file that contains all of our collections' hooks. As our project grows, the number of collections increases and the hooks count can quickly grow out of control. We end up with a hundred lines of code that are a nightmare to manage.


But as with any module, data.js, we are able to import-export whole modules at once.

Now, we have our hooks organized by collections which greatly simplify management for projects with large databases.

Having one file per collection is pretty neat don't you think?


124 views0 comments

Recent Posts

See All
Anchor 1

Need help with Velo ?

We provide tutoring and debugging session to all skills levels.

From amateurs to professional developers, help writing high-quality code for performance and security

Maybe later