define custom function in react function component code example Example: Which function is used to add functionality to a custom component? AFRAME.registerComponent(..);