Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

chore: Make worklets opt-in instead of opt-out

Aperta
#3,066 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
58/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
react, typescript
Ambito
frontend

Direzione di ricerca

Locate the @typegpu/react provider and the existing disableWorklets handling, then inspect how useEffect and ctx.config are used around the Root component. Make worklets opt-in and warn when disableWorklets changes after mounting; done means the default behavior and the documented key-based opt-in change are covered by the relevant tests.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Also, warn when the value changes across renders:

useEffect(() => {
  if (ctx.config.disableWorklets !== disableWorklets) {
    console.warn(`[@typegpu/react]: The config value 'disabledWorklets' changed after mounting. It controls hook behavior on a fundamental level, therefore this is not allowed.
In order to change this flag dynamically, change the provider component's key along with it, for example:
<Root disableWorklets={flag} key={flag ? 'worklets-disabled' : 'worklets-enabled'}>`);
  }
}, [disableWorklets]);
Lingua principale
TypeScript
Stelle
3.3k
Fork
135
Merge medio
4g 1h
PR unite (30g)
65

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di software-mansion/TypeGPU

Tutte le issue di software-mansion/TypeGPU

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.