svecosystem / runed

Magical utilities for your Svelte applications (WIP)
https://runed.dev
MIT License
387 stars 21 forks source link

Question and Suggestion #86

Closed GimpMaster closed 1 month ago

GimpMaster commented 1 month ago

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.

huntabyte commented 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:

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.