Skip to content

Conversation

@harrislapiroff
Copy link

I believe this note is accurate to how webc:setup works, based on this message from a Discord user:

webc:setup only runs once for the whole project - it doesn't have access to slots or anything else specific to some instance of the component. (But you can define functions there, then pass them the local data. I'd guess that slots could be passed in too, but I'm not sure if that's only available in webc:type="js".)

If this is indeed a correct understanding, I think this note would be helpful to new WebC coders in understanding the limitations and best practices with webc:setup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant