i am using casa https://github.com/dwp/govuk-casa to handle form data and journey
can someone suggest any better approach to achieve share(reuse) common data to other page
We are migrating an old(casa 6) project into casa 8 and utilising multi/sub app feature, its gonna be 3 sub app and I am trying to share(reuse) common data(user data) to other page if required eg we can fetch user address if user already filled in previous page
My understanding is casa8 "configure" method already provides a session.store option where we can choose any express-session to carry all user data(eg name, address, etc) and this express-session going to be common among all sub apps
And while moving from one page to another or one sub app to another we can carrie all the user form data in session-store as below(attached) image picked a scenario where I can use user name or address in App 2 pages
req.sessions.xyz = {
"page_A" : {
"First Name" :”value",
"Last Name" :"value "
},
"page_B" :{
"address" :”value",
"Email" :"value "
},
}
To proceed with this approach I am gonna use default session-store (i.e MemoryStore) but I believe changing it to another store eg redis will not require any extra effort
