I am using react router 7 for my blogging app and I have completed all the features but I am stuck with an issue of url navigation which is causing a dilema in user. For example I am in my home page with list of different blogs and a user click one of the blogs but the user will not be immediately redirected to the blog detail page untill the data from the server side is rendered completely, and in the server side the api request to get the blog detail runs and the paint the UI with the information on the server side and only user gets back the response and navigated to the detail page. I have tried to implement the loading skeleton using
const navigation = useNavigation();
const isNavigating = navigation.state === "loading";
But the issue is that this checks if the navigation is in loading state and display the loading skeleton of the current page that the user is on not the exact page they are trying to navigate.