Final project of the Power Reactor module! Combine all Vue.js reactivity techniques in a single monitoring system. You'll build a complete plasma reactor dashboard that tracks parameters in real time, generates alarms, and optimizes resource usage.
In this module you learned:
.value in scripts, automatic unwrap in template. Ideal for single values like temperature, status, counter..value. Cannot replace the entire object (only properties). Don't destructure without toRefs!shallowRef and shallowReactive track changes only at the first level. markRaw completely disables reactivity. Useful for large API data and external libraries.toRef(obj, 'key') for a single property, toRefs(obj) for all.isRef(), isReactive(), unref(), toRaw() for checking and unwrapping reactive values.Build a Reactor Monitoring System that includes:
Create a reactive object holding reactor data: temperature (Kelvin), pressure (kPa), energy level (%), status (ACTIVE/STANDBY/CRITICAL). Add buttons to modify values.
Use
ref([]) to store a list of system alarms. When temperature exceeds 4000K or pressure drops below 50kPa, automatically add an alarm to the list. Display alerts with the ability to dismiss them.Use
toRefs to extract individual values from the reactor object. Display them in separate interface components/sections without losing reactivity.Create an array of historical readings and mark it as
markRaw to avoid burdening the reactivity system. Display the last 10 readings in a history panel.Expand the starter below!