JSX Tokenizer: add tokens which can be parsed using `children`
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 42/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- typescript
- Ambito
- frontend
Direzione di ricerca
Inizia individuando l’implementazione di createToken e tracciando il modo in cui fallbackFn influisce sul valore JSX restituito e in cui l’helper children lo risolve. Confronta gli approcci proposti, quindi verifica che i token senza fallbackFn possano essere passati ai consumer basati su children, mantenendo al contempo definito il comportamento esistente di avviso amichevole.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe The Problem To Be Solved
Currently, the component returned by createToken will return a function element. This way we can display a friendly warning in the console if something tries to render the token, instead of an error from trying to insert a non-JSX.Element type.
The downside of that approach is that the token elements cannot be passed to a context provider, transition-group, or anything that tries to resolve the children using the children helper, even if it doesn't necessarily render anything yet.
So we lose a bit of functionality, and composition value, for a nicer misuse warning.
Suggest A Solution
I see this being implemented in two ways.
Either the createToken component will be returning an object, instead of a function if the fallbackFn param is not provided.
Or there could be createToken and createRenderableToken as separate functions.
- Lingua principale
- TypeScript
- Stelle
- 1.6k
- Fork
- 162
- Merge medio
- 19h 40m
- PR unite (30g)
- 8
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di solidjs-community/solid-primitives
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
solidjs-community/solid-primitives#1059 · 1 commento ·
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
solidjs-community/solid-primitives#1000 · 3 commenti · 5 reazioni ·
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
Tutte le issue di solidjs-community/solid-primitives
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
bcgov/bc-wallet-mobile#4761 · 1 commento ·
-
external-issue to-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
area-deployment area-integrations triage:bot-seen
Difficoltà 2/5 Mezza giornata Idoneità per principianti 86/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
refactor
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100