can't you change
{
path: "journalentry",
element: <JournalEntry onSave={Storage}/>
},
to
{
path: "journalentry",
element: <Storage/> // Render Storage component directly
}
because inside Storage Component, JournalEntry is rendered.
According to your code,
Storage is the parent component and it manage state and also has the save method. JournalEntry is a child component inside it