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

Add useTitle option to restore original on unmount

Aperta
#2,561 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

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

Direzione di ricerca

Start by locating the useTitle hook and reading how its existing restoreOnUnmount option behaves. Add the requested restoreOriginalOnUnmount option so unmounting restores the first title value rather than the previous one, and verify that the About-to-Profile-to-Home scenario produces the intended title.

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

Descrizione

Is your feature request related to a problem? Please describe.
When implementing useTitle you'd usually want to show a default when a page has not implemented the hook yet.

Describe the solution you'd like
An option restoreOriginalOnUnmount which will revert to the first title value.

Describe alternatives you've considered
restoreOnUnmount does a similar thing, but it reverts to the previous title, not the original one. This is actually not so useful for pages: if you go from About to Profile to Home and the latter doesn't set a title, it will restore to About.

Lingua principale
TypeScript
Stelle
44k
Fork
3.3k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

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 streamich/react-use

Tutte le issue di streamich/react-use

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.