Skip to content

[question] what is the purpose of ViewManagerDelegate #141

Closed Answered by cortinico
vonovak asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @vonovak,
Happy to respond,

Implementing the RTNCenteredTextManagerInterface does not enforce the presence of getDelegate()

You're right in saying that the generated Interface does not require you to pass a delegate.
On the other hand, your RTNCenteredTextManager needs to extend one of the ViewManager classes (i.e. SimpleViewManager or BaseViewManager or just ViewManager).

The ViewManager class however has a getDelegate() method which can be used to pass a ViewManagerDelegate. This class is conveniently generated for you by the codegen, and will take care of all the wiring for the setProperty and receiveCommand.

So in theory, you could avoid setting it, but your view won't work unles…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by cortinico
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants