[📖] Document how to extend JSX attributes. (Potential Feature Suggestion)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- documentation, frontend
Research direction
Start by checking Qwik's existing JSX and TypeScript type declarations alongside its documentation for JSX or HTML attributes. Document the supported way to extend JSX attributes for custom properties, using the UnoCSS example as a reference, or clearly explain if Qwik does not support this.
Written by the indexing model from the issue text.
Description
Suggestion
Hello all.
I've seen this asked about multiple times in the Discord, and have yet to see an answer provided, so I thought this was the next best idea.
Many Vite plugins (see UnoCSS) add/change properties on HTML elements.
With TypeScript, errors are raised when an unknown attribute is found.
In other frameworks you can extend the JSX HTMLAttributes interface in a custom shims.d.ts or similar.
For example, in SolidJS, using UnoCSS preset-attributify:
import type { AttributifyAttributes } from '@unocss/preset-attributify'
declare module 'solid-js' {
namespace JSX {
interface HTMLAttributes<T> extends AttributifyAttributes {}
}
}
I still haven't figured out how to do this in Qwik. I'm a noob when it comes to JSX internals though, so it could just be me.
My suggestion is that extending JSX attributes be clearly documented
(or if there is currently no support, add it; hence "Potential Feature Request")
Regards,
- Dominant language
- TypeScript
- Stars
- 22.1k
- Forks
- 1.4k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 130
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from QwikDev/qwik
-
[🐞] Production SSR render errors are never logged or passed to `next()` (node middleware returns on `headersSent` first)Possibly taken @bunnysayzz claimed this 13 days ago. OpenIMPORTANT
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
QwikDev/qwik#9191 · 6 comments ·
Maintainers usually reply within 1 day
-
docs router V2
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
DX enhancement V2
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
QwikDev/qwik#8480 · 2 comments ·
Maintainers usually reply within 1 day
-
[🐞] Library builds (--mode lib) print manifest warnings and emit an app manifestPossibly taken @mridang claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
juice-shop/juice-shop#3706 ·
Maintainers usually reply within 1 day
-
sbx up from a subfolder silently pushes the whole work treePossibly taken @pdettori claimed this today. Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
outline/outline#14348 · 1 comment ·
Maintainers usually reply within 1 day
-
bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day