Moved matrixEdges to its own state - calculating that based on window size, and using that for useEffect.
getCardsInMatrixToShow now just take IMatrixEdges as an argument (instead of everything it needs to calculate that)
Moved CardsMatrix code to its own file
Moved IMatrixEdges calculation into DraggableCards - and have its calculation simplified by just passing it a windowSizeInCards, which is also memoized based on window size.
Made Vector immutable as to avoid some confusion and possible unexpected behavior with react #51
Made Vector implement an array of numbers - so that we don't need to typecheck inside the functions.
matrixEdges
to its own state - calculating that based on window size, and using that for useEffect.getCardsInMatrixToShow
now just takeIMatrixEdges
as an argument (instead of everything it needs to calculate that)CardsMatrix
code to its own fileIMatrixEdges
calculation intoDraggableCards
- and have its calculation simplified by just passing it a windowSizeInCards, which is also memoized based on window size.Vector
immutable as to avoid some confusion and possible unexpected behavior with react #51Vector
implement an array of numbers - so that we don't need to typecheck inside the functions.