You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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:
PascalCase - reactive classes and must be instantiated with new Thing()
camelCase (activeElement) - reactive global objects that can be imported and whose value can be accessed with .current, no need to instantiate
useXYZ - usually wrap functions or use 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.
The text was updated successfully, but these errors were encountered: