Adding more examples for the flushSync method
Nessuno ha ancora preso questa issue.
- Lingua principale
- JavaScript
- Stelle
- 11.8k
- Fork
- 7.9k
- Merge medio
- 1g 11h
- PR unite (30g)
- 11
Descrizione
Hey there, I'm the author of the following post https://giacomocerquone.com/keep-input-cursor-still/ where I showcased a few pain points while managing an input's cursor.
Earlier today I also noticed this tweet from Ryan Florence where he was showcasing the usage of the flushSync method in a similar way to the one I was going after using low-level asynchronicity js tools to tame the eventloop such as setTimeout, await Promise.resolve(), etc. etc.
Do you think we could add such examples in the docs or it's just an internal method not to be used so commonly?
Svelte has also something similar in its documentation/tutorial with the tick method https://learn.svelte.dev/tutorial/tick
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.
Direzione di ricerca
Inizia individuando la documentazione e gli esempi esistenti di flushSync, quindi esamina l’articolo collegato sulla gestione del cursore e l’esempio di Ryan Florence per individuare i casi d’uso pertinenti. Il lavoro sarà completato quando saranno aggiunti esempi chiari alla documentazione, oppure sarà documentato perché flushSync non dovrebbe essere usato comunemente, con indicazioni coerenti con l’uso previsto di React.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, react
- Ambito
- documentation
- Tipo di issue
- Documentazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 35/100