mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
[feature-107] progress on playlists (lot of things, i don't remember all things i've done in this commit)
This commit is contained in:
@@ -5,7 +5,7 @@ export function useObservable<T>(factory: () => Observable<T>, initValue?: T, de
|
||||
const [obsValue, setObsValue] = useState<T>(initValue);
|
||||
|
||||
useEffect(() => {
|
||||
const sub = factory().subscribe(val => setObsValue(() => val));
|
||||
const sub = factory().subscribe(val => setObsValue(val));
|
||||
return () => sub.unsubscribe();
|
||||
}, deps ?? []);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user