1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【Vite×React×Nest.js×PostgreSQL】React-Router-Domでページ遷移を制御する

Posted at

Blue, Orange and Grey Illustrated Ethical Hacking Toutube Thumbnail  .png

サンプルイメージ

サイドバーの商品一覧リンクをクリックすると、
image.png
商品一覧画面に遷移する
image.png

ページ遷移の際、<a>タグを使いがちですが、ページリロードを引き起こさないためにLinkを使いましょう。

sample.tsx
import { Link } from "react-router-dom";

<Link to="/products/products-list" className="block py-1 hover:text-blue-400">
  商品一覧
</Link>

react-router-dom

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?