kopia lustrzana https://github.com/cheeaun/phanpy
Make this more readable
rodzic
2d94f229c3
commit
a0f16057a0
|
@ -30,7 +30,8 @@ export default function useTitle(title, path) {
|
||||||
}
|
}
|
||||||
|
|
||||||
useLayoutEffect(() => {
|
useLayoutEffect(() => {
|
||||||
|
const unsub = subscribeKey(states, 'currentLocation', setTitle);
|
||||||
setTitle();
|
setTitle();
|
||||||
return subscribeKey(states, 'currentLocation', setTitle);
|
return unsub;
|
||||||
}, [title, path]);
|
}, [title, path]);
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue