2 ms·
> I'm familiar with React. And no, links in React often don't work without extra attention. ^ These two statements are at odds with each other. React will ret
by troupo 2y ago
> I'm familiar with React. And no, links in React often don't work without extra attention.
^ These two statements are at odds with each other.
React will return a pure browser link that behaves exactly as a browser link:
function Comp() { return <a href="some-link">text</a>; }
> The widgets have a click handler that opens the widget details.
>
> Now you right click on it. If you're lucky, it opens the widget details in a separate tab. However, the filter information is lost.
So, the problem isn't React. The problem is people overriding default browser behaviour for their widgets. It was a problem before React, and it will be a problem long after React.
For example, here's Google's premier site about web technologies: https://web.dev/articles https://web.dev/articles Check out the pagination links at the bottom. There's no React on the page
- cyberax 2y ago> React will return a pure browser link that behaves exactly as a browser link No it doesn't (in practice). React is typically used with something like React Router that takes over the whole sub-tree of paths. So links are handled by the single-page app itself, and this can lead to the state leaking through. Yes, you don't _have_ to do it this way.
- troupo 2y ago> No it doesn't (in practice). Yes , yes it does, in practice. > React is typically used with something like React Router that takes over the whole sub-tree of paths. So links are handled by the single-page app itself, "Taken over by Router", "handled by SPA itself" .... "React is to blame" > Yes, you don't _have_ to do it this way. Yes, you don't have to it this way, and this isn't React-specific. See Google's web.dev site built with web components