Follow

React で web アプリつくってて、ページに back ってボタン作った。んで、押した時の挙動で悩む。。。

前のページが検索結果だったとき、 ページ内の "back" を押したら、スクロール位置も戻っててほしくないか??みたいな。 ブラウザの戻るボタンだとスクロール位置とともに戻ってくれるのよね(今のとこ)。

history.back() のほうがいいんかなー。
もうちょい全体像が見えてから UI 見直さんとダメね。

· · Web · 0 · 0 · 0
Sign in to participate in the conversation
Mastodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!