clintonwoo / hackernews-remix-react

Hacker News clone written with universal TypeScript, using React and Remix.
https://remix.hnclone.win
MIT License
487 stars 36 forks source link

Use `<Link/>` to take advantage of Remix navigation #4

Closed kiliman closed 2 years ago

kiliman commented 2 years ago

Looks like all your links (see item-title.tsx) are using the standard <a/> tag, instead of <Link/>. This is causing the browser to reload the entire page on every navigation. By using the <Link/> component, Remix will issue a client-side fetch, then render the item page.

clintonwoo commented 2 years ago

Thanks for pointing this out, the URL only really needed to be an a tag when it was external.

The from page was missing from the project so I've added that and made it a Link.

The upvote is now a Link too.

The external urls weren't actually correctly working on the news feed either so that's fixed. And the domain link is now added too.