functional-element
functional-element copied to clipboard
Functional custom elements
What if every update just registered a state change, and then once the function returned, all state changes would be executed in order? I think that might actually fix all...
The user-defined properties, it would be great if we could get types for them
It would be nice to be truly recursive, if you could just call yourself again
It might be nice if there was some sort of once function as a parameter to the creation function that would allow the user to run something only one time...especially...
It would be nice to be able to await certain events potentially in the definition functions...like awaiting connected or something like that, maybe
You might want to use a sort of top level await inside of your custom element definition function...I don't think we can do that currently
I don't think you should have to initialize the props in the constructor to them update the props later on. Right now that breaks things
I'm having some troubles setting methods on each element...I'm doing it through properties, but it isn't elegant currently
I would recommend against in most cases, but sometimes you have no choice because of the third-party dependency you're using, not to mention eventually extending other built-in elements