Skip to content

Commit 99c5ee5

Browse files
committed
add sortableBits todos
1 parent a32ee60 commit 99c5ee5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/components/sortable/Sortable.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ const SortableContext = createContext();
1616
// This custom hook will add React ref to the element and then push respective DOM node to the array on nodes on mount
1717
function useSortableElement() {
1818
const ref = useRef(null);
19+
20+
// TODO use sortableBits to subscribe to only certain parts of context
1921
const { addNode } = useContext(SortableContext);
2022

2123
useEffect(() => {
@@ -34,6 +36,8 @@ function useSortableElement() {
3436
// Our component will then be automatically notified about it and rerender
3537
function useSortable(initialItems) {
3638
const [items, setItems] = useState(initialItems);
39+
40+
// TODO use sortableBits to subscribe to only certain parts of context
3741
const { isDragging, oldIndex, newIndex } = useContext(SortableContext);
3842

3943
useEffect(() => {

0 commit comments

Comments
 (0)