Closed GimpMaster closed 1 month ago
Quick question, why is the naming of the runed utilities all over the place.
In some cases you use useXYZ in some cases you use PascalCasing like MediaQuery or ElementRect or some cases its camelCase isMounted()
Trust me, we exhausted bikeshedding the naming convention for the various utilities. It's not 100% set in stone, but here's the general idea behind it and how to think of the different casings:
new Thing()
.current
, no need to instantiateuse
is prefixed to avoid conflicting with a DOM API (IntersectionObserver, ResizeObserver), etc.These aren't hard-set and we're approaching each one on a case-by-case basis.
I'll also see if @TGlide wants to provide any additional mental models/context here to help justify.
Change Type
Addition
Proposed Changes
I came to the github link directly from a post in the Svelte Discord. I tried looking at the readme but I couldn't find the documentation site. Finally I found runed.dev in some sample code. It would be great to add a link to that in the readme.md
Quick question, why is the naming of the runed utilities all over the place.
In some cases you use
useXYZ
in some cases you use PascalCasing like MediaQuery or ElementRect or some cases its camelCase isMounted()Just curious the reasons.