Skip to content

Should useMeta follow the Stimulus member variable naming convention? #83

Answered by adrienpoly
leastbad asked this question in Ideas
Discussion options

You must be logged in to vote

Thanks for this excellent and valid suggestion

I don't think anyone put it in production so having a breaking change is largely acceptable for me at this point. I was thinking about putting a process where new mixin would be released in some beta version first with potential breaking changes without having to bump the full library to a major version. (other topic any way)

Back to the subject, one solution I can think of would be to pass an option

useMeta(this) // this.token
useMeta(this, { suffix: true }) // this.tokenMeta
useMeta(this, { suffix: "value" }) // this.tokenValue

Does it default to false ? My experience was to use it for some pretty obvious things such as userId, environment,…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@leastbad
Comment options

@leastbad
Comment options

@adrienpoly
Comment options

@leastbad
Comment options

Answer selected by adrienpoly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants