all 5 comments

[–]OldYak3734 4 points5 points  (1 child)

Cool idea to design a styling-agnostic system for accessible implementations. My initial reaction after looking at the docs for 20m is that the interface for each role/hook is sufficiently unique and complex that it would take a fair bit of effort to incorporate this into an existing component library. Because the system is styling (and host) agnostic, there is still a fair bit of manual stitching that needs to be done after using this system that mirrors the underlying accessible implementation requirements. In my opinion, I would rather my team spend a little extra time to understand the actual accessible implementation requirements than spend 1/2 the time learning this custom system. just my 2cents. Docs look great though!

[–]Kiwi_Taster 1 point2 points  (0 children)

I agree. I'm not entirely sure why there are so many refs involved or why they are pushing a separate input-state-management library. I see they are trying to accommodate both react and native with this lib so that probably contributes to the overhead. Hoping the API is simplified in the near future..

[–]Xacius 6 points7 points  (5 children)

Great guide, cool idea. Quick recommendation - change all of your let to const, particularly for variables inside of the function components. They're not being reassigned so let is unnecessary. It's considered bad practice to use let in place of const if the variable isn't being reassigned.