Skip to content

How do I create bindings where I listen to a property and when it's triggered I save a value to a Component's state? #425

Answered by JaggerJo
matachi asked this question in Q&A
Discussion options

You must be logged in to vote

First, you should prefer correct bindings over resorting to the init function.

I highly recommend using the existing bindings as a reference.

Some controls (mostly 3rd party ones) require certain methods to be called on initialisation. That does not work well with bare components and is where the init function is really useful.

The init function gives you access to the actual control instance when the underlaying control is initially created.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@matachi
Comment options

@JaggerJo
Comment options

@matachi
Comment options

@JaggerJo
Comment options

Answer selected by matachi
@matachi
Comment options

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