Pass localStorage data to hsb


Is it possible to pass data from localStorage to hbs template?
Get id’s of post from localStorage like:

data = JSON.parse(window.localStorage.getItem('recNewsData'))

This id’s i want to put inside
{{get "posts" filter="ids:[data]"}}

No, localStorage is specific to a browser/client, meaning the get helper won’t have any of that information.

Your best bet is to use client side rendering using the content API