I am struggling with Data Storage and have been following Creating a Shopping Cart with the Data Store Component very closely.
My situation is different but yet very similar.
In it’s basic form I have an Input Radio Group with three radio buttons. I am trying to store the ID/name/value of the checked button in Local Storage, and then display that Local Storage info on the same web page.
My pages are SPA.
Should the on-click event be on the label or input?
My on-click event looks like
dmx-on:click="specialist_data.upsert({id: specialist_id},{name: specialist_name, value: specialist_cost, id: specialist_id})"
My values on the page display as
<p>name :: {{specialist_data.data[0].name}}</p>
<p>value :: {{specialist_data.data[0].value}}</p>
but nothing is showing
I don’t know what I am doing wrong, please help.
Also, how can I use DevTools to view the local storage and to see what is passed between the radio button and the local storage?
Last updated: