As I'm trying to refresh the page by using window.location.reload() method the page is reloading but it is redirecting from current page to home page.I have searched more number of methods like setInterval() but when we add,delete and edit the record after clicking the submit button the record in the table is not visible.so as i'm new to this react js,anyone please help me to overcome from this issue
The correct approach maybe must be store the data of your table like a state.
If you're using hooks:
const [dataTable, setDataTable] = useState(null)
And after you add, edit or delete a record you should update your dataTable state with the new dataTable.
onDataTableChange = (data) => {
setDataTable(data) }
This going to update your state and re-render with the new data.