How do I access the content of the timeline displayed under each doctype?

I am using react-frappe-sdk and want to access the timeline content that is displayed in each document.
End goal is the show a timeline in my react application similar to that of frappe.
How can I achieve this?