A bunch of optimizations to explore to make it load faster. Behavior is not changed; just the performance:
In CardMatrix only recalculating grid when it changes. Calculate students to show when those change. Also memoizing the offset calculation with card matrix. A lot less is calculated now on each change.
In StudentCard memoizing the callback functions so that they are not re-built on every render.
Rendering components of explore even when students are not available yet, so that they are rendered on page load and not when drawn every time.
A bunch of optimizations to explore to make it load faster. Behavior is not changed; just the performance:
CardMatrix
only recalculating grid when it changes. Calculate students to show when those change. Also memoizing the offset calculation with card matrix. A lot less is calculated now on each change.StudentCard
memoizing the callback functions so that they are not re-built on every render.