Theo's Typesafe CultTTC
Theo's Typesafe Cult4y ago
17 replies
noctate

share state array between pages

Hey guys so the idea is pretty simple but I'm kinda stuck to achieve this. So I have functionality when I click a button I add id to the array, when I click it again I remove the id from the array. But now I want to use this array also in different page. For context I'm trying to build a "favorite list" so I probably need to preserve this array somehow, maybe with local storage? How should I go about this?
Was this page helpful?