I’m trying to understand when and how to use Navigation API (2025-10).
My current setup (inspired by Navigation API):
- Main screen (
TransferSelection.jsx) - Transfer details (
TransferDetail.jsx) - Line Item of transfer (
TransferDetailItem.jsx)
So this is my Modal.jsx (pos.home.modal.render) that routes to the different screens.
function Extension() {
const { url } = navigation.currentEntry
if (url === '/TransferDetail') {
return <TransferDetail />
}
if (url === '/TransferDetailItem') {
return <TransferDetailItem />
}
return <TransferSelection />
}
I’m able to pass a state via navigation.navigate().
Example:
navigation.navigate('/TransferDetail', { state: { transferId: transfer.id } })
What is unclear to me is how to pass data e.g. to the previous screen
<TransferDetail>opens a screen for a line item- user adds information on
<TransferDetailItem>(component state) - user navigates back (or clicks a button)
- back on
<TransferDetail>there’s a button that performs the transaction with all information the user added for multiple line items
So I can’t see a clean way to pass back data from <TransferDetailItem> to <TransferDetail>.
Probably such a screen isn’t meant to be used this way? And I shouldn’t think about using screens this way? Like using <TransferDetailItem> directly within <TransferDetail>