Replies: 1 comment
-
It depends on what capabilities Lit provides. Are there similar solutions? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello 👋
We use valtion in a project built out of web-components, mainly using https://lit.dev.
Lit has it's own way of handling component state that looks something like this:
Whenever that state value is updated it tigers component to re-render. For global values like
userId
above we use valtio and are currently adding following logic to subscribe to it and update component state:This works, but I was wondering if there is a chance to make a utility that could help clean this up i.e something like:
Idea her is that
getKey
would return new value whenever state changes.Beta Was this translation helpful? Give feedback.
All reactions