Webix Jet API use class or const

Hello Webix Forum.

I’m starting code webix using webix jet framework.
I’m still confuse about creating the webix component initialization whether use class or just const.

My Question is when should we use export default class “view” instead of export default “const” to make a webix UI config initialization ?

I hope someone can give an explanation about this.

Regards,
Irvan

Both methods provide nearly the same result.

  • when you are using “class” approach, you can define UI config and init|ready|change|destroy handlers
  • when you are using const you can define UI config only

So it is a flexibility VS brevity.

If you are not sure which one to use, use classes. A class with config method works exactly the same as the “const” declaration.