Hi Thunkable folks,
I have started playing with the new-ish Custom Components features. There’s one thing that’s throwing me off:
Is there a way for a custom component to set its own property dynamically using blocks?
I can:
- Set a property from an outside project that is using the component.
- React to a change in the property within the component.
- Set a “default value” for the property.
But when a property is added to a custom component, I’m only given a block for accessing the property, not one for setting it:
This means that properties can only be used for information going into the component, they cannot be used for information out of the component. That feels weird though, because lots of components have variables that we’d like to expose externally.
Without the option to internally set a property, it seems like the way to do this is to not use properties at all and instead to use methods for sending a value into component and events for sending a value out of component. That’s OK if it needs to be a very event-driven type of interaction, but it’d be nice if properties could be used to pass info both ways by basically just being regular variables that are exposed outside of the component.
Or maybe there is a way to set properties and I’m just really confused! In which case, help?