Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Props from Navigation disappear at page refresh/reload

オープン
#4,332 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
javascript, react
領域
frontend

調査の方向性

browserHistory と f7.views.main.router.navigate("/somePage/", {props: {id: 123}}); を使用する最小限の Framework7 React アプリから始め、ブラウザの再読み込みの前後で React DevTools または useEffect 内の props を調べます。完了条件は、直接 URL ナビゲーションを壊すことなくナビゲーション props を再読み込み後も保持できるかどうかを判断し、プロジェクトに再現テストが用意されている場合はそれを追加または更新することです。

索引モデルが issue の本文から書いたものです。

説明

  • Framework7 version: ^8.3.4
  • React.js version: ^18.3.1
  • Platform and Target: Desktop App
  • Live Link or CodeSandbox: Can not be replicated in Sandbox due to different behaviour when reloading the page
Describe the bug

When navigating to a route and passing props with the options
f7.views.main.router.navigate("/somePage/", {props: {id: 123}})
the props object correctly contains id. But when reloading the page (via Browser) it disappears.

Additional Information:

  • I am using browserHistory as defined in the View Component. Otherwise the reload wouldn't even work as intended.
  • f7router and f7route stay in the props object even after reloading
To Reproduce

Just build a simple app, try navigation with props and then reload the page. Control the contained props with React DevTools, or just log them to the console with a useEffect.

Expected behavior

The set property from navigation should stay when reloading the page.

Actual Behavior

It does not persist.

Additional context

My guess would be that this behaviour might be somewhat intended, since navigating directly to the page (via URL) does not provide any properties and distinguishing between that and a page reload could be difficult. But i think this should still work.
I will probably work around this by storing the passed property in a global store that provides it's own persistence, but i still f7 should be able to handle this.

主要言語
JavaScript
スター
18.8k
フォーク
3.2k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

framework7io/framework7 のほかの issue

framework7io/framework7 の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。