The docs is really confusing. It would be better if the creators can provide a full-fledged example with UI integration.