I was implementing markdown parser in my project and ran into a problem where links with relative paths were redirecting to a page and clearing state (acting as standard anchors) due to page reload. React Router Link component or useNavigate() secures the page reload and keeps the state. I was suggested to use marked-react for this but it didn't solve my problem.
Could you please provide solution for replacing anchors with Link component?
I was implementing markdown parser in my project and ran into a problem where links with relative paths were redirecting to a page and clearing state (acting as standard anchors) due to page reload. React Router Link component or useNavigate() secures the page reload and keeps the state. I was suggested to use marked-react for this but it didn't solve my problem.
Could you please provide solution for replacing anchors with Link component?