Closed keutmann closed 1 year ago
Thanks for the PR, but I just added Hex, PublicKey and EventID classes https://github.com/irislib/iris-messenger/blob/master/src/js/utils/Hex/Hex.ts and Key.isMine(str). I think it's good to be a class so it can be used as a parameter type.
Gotcha, I saw the classes you added. I used the useKey idea mainly to dodge the key format recalculation on every render and simplify the component code. But I get where you're coming from with the class approach.
Some of my code from the DWoTR fork. I think it simplifys the code by delegating the different key formats in the same hook and scandalize the names of keys in other function components. Demo implementation in Badge.tsx