Menu
CoddyTech

Recap: Trip Pack

Part of the Routing and State section of Coddy's Vue journey. Lesson 40 of 55.

challenge icon

Challenge

Medium

Build a setup store for a trip pack. Begin with bags 1 and bottles 2. Return both refs, a computed pieces sum and a reset action. The Add bag and Add bottle buttons increment their own fields. Reset restores both initial values, and p#pieces, p#bags and p#bottles must always agree.

Keep the supplied route readout and bootstrap files.

Try it yourself

<!doctype html><html><head><meta charset="UTF-8"><title>Routing practice</title></head><body><div id="app"></div><script type="module" src="./main.js"></script></body></html>

All lessons in Routing and State