on f34e8d0 help sign in
bridge/src/lib/useSyncPoint.js
12 lines 299 B history raw
1import { useEffect } from 'react';
3import { usePointCache } from 'store/pointCache';
5// sync a specified point to the cache
6export default function useSyncPoint(point) {
7 const { syncOwnedPoint } = usePointCache();
9 useEffect(() => {
10 syncOwnedPoint(point);
11 }, [syncOwnedPoint, point]);