How to replace existing widget with my own

Now I know how to write a widget and display it via plugin. But how can I replace discourse’s existing widget like ‘hamburger-categories’ with my own custom widget.

If you createWidget with the same name (hamburger-categories) it should replace the existing one with yours.