Thanks so much, this is great! Is there a way for me to do it without adding const o or can I do that in vuex where I have data saved?
Also is there a way for me to assign a data point to a div? Like for ex if I have many boxes of different measurements, when the data comes in I want it to assign the data point to the box in vue:
<template>
<div class="box a" >
Temperature: {{}} //will display 300 here
</div>
<div class="box b" >
Volume {{}} // will display 200 here
</div>
</template>
Basically like a way for the template to know to assign the correct data points to the correct box.
Yes, of course . It was just an example to show you how can be achieved. Vuex is just an object, so if you have access to any particular object inside the state managed by it, you can do the same.
I would say, 99% of the time everything is possible. In rare cases, you have to
restructure your project/code to implement what’s needed.
Vue, as well as Angular and React, has something called Conditional Rendering, so use that to do what you asked .