Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

Best way to implement a floating date container in React web application?

My React web application requires a floating date container in a timeline. This is similar to WhatsApp. See below:

enter image description here

The time would list items in reverse chronological order and when I scroll the timeline I need to be able to update the floating date container accordingly when I an item with a new date is at the top of the timeline container. Each item would have a date prop associated with it (and probably a data date attribute).

What is the best way to achieve this in React? Would I need to rely on jQuery to do this?

I was thinking of having each item in timeline separated by the date container which would be a sticky that sticks to the top when scrolled.

I don't have any sample code as I've not begun implementing this yet.

Comments