# Mobile: navigation history from note to note

**URL:** <https://discourse.joplinapp.org/t/mobile-navigation-history-from-note-to-note/27924>\
**Category:** Development\
**Created:** [23 October 2022 21:04 UTC](https://discourse.joplinapp.org/t/mobile-navigation-history-from-note-to-note/27924 "2022-10-23T21:04:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shinglyu](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/shinglyu/32/12900_2.png) [@shinglyu](https://discourse.joplinapp.org/u/shinglyu)\
**Post date:** [23 October 2022 21:04 UTC](https://discourse.joplinapp.org/t/mobile-navigation-history-from-note-to-note/27924/1 "2022-10-23T21:04:12Z")

</div>

I'm trying to fix [Mobile navigation experience with note links](https://discourse.joplinapp.org/t/mobile-navigation-experience-with-note-links/23810)

More specifically: When you click on a Joplin note link in note 1 to navigate to note 2, you can click the hardware "back" button to go back to note 1. Currently, it always goes back to the notebook view.

I'm stuck at [joplin/Note.tsx at dev · laurent22/joplin · GitHub](https://github.com/laurent22/joplin/blob/dev/packages/app-mobile/components/screens/Note.tsx#L171) . Look like the Note view does not allow hot-swapping the content. So the current hack is to first navigate back to the notebook view and navigate to note 2. My questions are:

1. What prevents the `Note` view to reload another note? Is it easy to fix?
2. There seems to be a lot of workarounds to avoid refactoring the note navigation history(see [joplin/root.tsx at dev · laurent22/joplin · GitHub](https://github.com/laurent22/joplin/blob/dev/packages/app-mobile/root.tsx#L256)) Have someone though about how to refactor it? I don't want to add more hacks on top of it to support the note-to-note navigation.

---

<div class="post-metadata">

**Author:** ![wimmers](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/wimmers/32/16564_2.png) [@wimmers](https://discourse.joplinapp.org/u/wimmers)\
**Post date:** [7 June 2023 10:44 UTC](https://discourse.joplinapp.org/t/mobile-navigation-history-from-note-to-note/27924/2 "2023-06-07T10:44:41Z")

</div>

I've tried to make some progress on this as well.

A demo of what I'm trying to achieve can be seen in [this thread](https://discourse.joplinapp.org/t/mobile-quickly-add-notes-incl-prototypes/30085/5).

The implementation of the history feature is basically this:

- Enable hot-reload for CodeMirror
- When the `Note` component's props update to a different note id, reload the note
- To track note navigation history, hand `NOTE_SELECT` and `FOLDER_SELECT` actions to the shared reducer when handling `NAV_GO` actions in the app reducer

So far, this doesn't change the behavior of the back button, because it manges its own history.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/3X/1/c/1c948e33314e232a0927789508474d8624f4270b.png) [@system](https://discourse.joplinapp.org/u/system)\
**Post date:** [1 June 2024 10:45 UTC](https://discourse.joplinapp.org/t/mobile-navigation-history-from-note-to-note/27924/3 "2024-06-01T10:45:06Z")

</div>

This topic was automatically closed 360 days after the last reply. New replies are no longer allowed.
