Auto update Datatable

Hello
I hope this was not asked before.
I am sure it is a stupid question but I am beginner with Textual and I like it a lot and dont want to gave up.
can someone tells me how to auto update a Datatable where rows = function()
lets say the function calls an API to get new data and I want the DataTable to automatically Refresh when the content is changed.
I know there is reactive but couldnt really know how to apply it on Datatable.
sorry again if this was asked before.
thank you