Coding task · Vue.js course · Module 9: Composables & VueUse

Practice: Factory Composable

Create a factory composable for managing NOVA LAB station resources.

Task

Build createResourceManager that accepts name and maxCapacity. Return currentLevel (ref), percentage (computed), consume() and refill().