Exactly, I am trying to check its state in a h3 which I displayed in the picture,
First I am storing the state in a datastore component, (Notifyonearlyavailability.checked ) and everytime the user clicks on it the value should get updated, but when it gets updated its showing the wrong value, it shows true, when it should be false and vice versa.
But that's not how you check the checked state. As I explained it should have .checked at the end of the expression.
Also I don't really understand what exactly are you trying to do with the onclick event of the label? Maybe If you explain what are you trying to achieve I will be able to help...
I was trying to store the value of the checkbox state in a datastore field because I have a multi step form and I wanted to store the value so that I can use it in other places, but unfortunately it is not working with me, I will just have to connect with the .checked state directly, which is also fine with me.
That is why I had an on click event on the checkbox so that the datastore field of the checkbox would update everytime, however that is not happening accurately, as the datastore is saving the wrong value of the checkbox, as you can see in the image below
<h3>checkbox state = {{Notifyonearlyavailability.checked}}</h3>
<h3> datastore value = {{datastoreApp.data[0].notifyearly}} </h3>