Check out example codes for "registering a new QML type". It will help you in understanding the concepts better.

Code Example 1

qmlRegisterType<MyClass>("MyClass", 1,0, "MyClass");

Learn ReactJs, React Native from akashmittal.com