feat: add support for commenting and reacting on external content
This commit is contained in:
parent
5ba5c26fcd
commit
0bb62dd3fb
76 changed files with 1635 additions and 639 deletions
9
src/hooks/useStuffStatsById.tsx
Normal file
9
src/hooks/useStuffStatsById.tsx
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import stuffStats from '@/services/stuff-stats.service'
|
||||
import { useSyncExternalStore } from 'react'
|
||||
|
||||
export function useStuffStatsById(stuffKey: string) {
|
||||
return useSyncExternalStore(
|
||||
(cb) => stuffStats.subscribeStuffStats(stuffKey, cb),
|
||||
() => stuffStats.getStuffStats(stuffKey)
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue