kaiyote / kaiyote/use-web-component
camelCase props passed into the props map, should probably assume they're 'properties' and not 'attributes'?
- Dominant language
- TypeScript
- Stars
- 2
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
html attributes are always lower case, hence why they tend to kebab-case, so you can tell the words apart. If you stick a camelCase prop on a web-component tag in react, it gets forced to lowercase, and stringified to boot, so might be best to assume camelCase things passed to the hook were meant as properties?
Make that the default? Have an option to tell it to kebab-case them if they're feasible to send as attributes?
Contributor guide
Research direction
No file or test is named in the issue. Start at the hook's props-map handling and determine how camelCase values are currently classified; done means camelCase props default to properties while providing an option for feasible kebab-cased attribute names.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100