Uses a feature of React Router v6 internally to have more flexibility over naming of the keys.
Needs two params:
- A key to uniquely identify the list in the page
- A reference to list's HTML element
Inspired by a hook used in Remix. (Watch this video)