Maintainable stores

16 lessons

Get access to the complete guide to developing and deploying fast, production-ready Pinia apps.
Buy License
40. Creating defineReadonlyState

Note: Make sure to finish the previous exercises before working on this one.

Let's create a custom defineReadonlyState() that creates private state and then exposes it as readonly in the public store. This is like the definePrivateState() with a twist!

Solution

Eduardo

Eduardo San Martin Morote

5

Debugging stores with the Devtools

1 lessons