File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ const SortableContext = createContext();
16
16
// This custom hook will add React ref to the element and then push respective DOM node to the array on nodes on mount
17
17
function useSortableElement ( ) {
18
18
const ref = useRef ( null ) ;
19
+
20
+ // TODO use sortableBits to subscribe to only certain parts of context
19
21
const { addNode } = useContext ( SortableContext ) ;
20
22
21
23
useEffect ( ( ) => {
@@ -34,6 +36,8 @@ function useSortableElement() {
34
36
// Our component will then be automatically notified about it and rerender
35
37
function useSortable ( initialItems ) {
36
38
const [ items , setItems ] = useState ( initialItems ) ;
39
+
40
+ // TODO use sortableBits to subscribe to only certain parts of context
37
41
const { isDragging, oldIndex, newIndex } = useContext ( SortableContext ) ;
38
42
39
43
useEffect ( ( ) => {
You can’t perform that action at this time.
0 commit comments