Yes, always look at existing plugins.
Here’s an example:
https://github.com/paviliondev/discourse-locations/blob/af2bb17c181459ac25a140d5f8a2e1ff0b42e5f1/plugin.rb#L119
Which relies on this connector and component:
https://github.com/paviliondev/discourse-locations/blob/af2bb17c181459ac25a140d5f8a2e1ff0b42e5f1/assets/javascripts/discourse/connectors/edit-topic/edit-location-details.hbs#L1