Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5ba068a

Browse files
committed
docs: add notes about potential other approach for hook
1 parent 93cf58a commit 5ba068a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

site/src/hooks/useTimeSync.tsx

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
/**
22
* @todo Things that still need to be done before this can be called done:
3-
* 1. Add tests and address any bugs
3+
* 1. Explore an idea for handling selectors without forcing someone to specify
4+
* data dependencies for what values are accessed via closure:
5+
* - A selector is ALWAYS run synchronously in a render. There is no way to
6+
* opt out of this behavior, not even memoization
7+
* - The selector is still used to determine whether a component should
8+
* re-render via a time update. It will be assumed that whatever function
9+
* is currently available will always be the most up-to-date
10+
* - This approach might make it more viable to combine useTimeSync and
11+
* useTimeSyncSelector again
12+
* 2. Add tests and address any bugs
413
*/
514
import {
615
type FC,

0 commit comments

Comments
 (0)