Dynamically created custom components

hi, i am migrating an existing cocos2d-js project (v3.10) to cocos creator. there are so many API changes that its really hard to successfully migrate
my current question is this - i have a custom class “BBComponent” that extends cc.Component , currently none of the prefabs or scenes on the IDE are using it. but i do want it do be used on a click of a button.

so i did this.node.addComponent("BBComponent") but it didnt work, what am i doing wrong?