You do not need an OnUpdate script for anything you are doing. If you want to update when you enter/leave combat, register for the events that fire when you enter/leave combat in your OnLoad script:
Code:
self:RegisterEvent("PLAYER_REGEN_DISABLED")
self:RegisterEvent("PLAYER_REGEN_ENABLED")
However, it's probably more logical to just register for the events that fire when your stats change, so your panels will always update themselves when your stats change:
Code:
self:RegisterEvent("COMBAT_RATING_UPDATE")
self:RegisterEvent("MASTERY_UPDATE")
self:RegisterUnitEvent("UNIT_ATTACK", "player")
self:RegisterUnitEvent("UNIT_ATTACK_POWER", "player")
self:RegisterUnitEvent("UNIT_RANGED_ATTACK_POWER", "player")
self:RegisterUnitEvent("UNIT_RANGEDDAMAGE", "player")
self:RegisterUnitEvent("UNIT_RESISTANCES", "player")
self:RegisterUnitEvent("UNIT_SPELL_HASTE", "player")
self:RegisterUnitEvent("UNIT_STATS", "player")
Not all stats need all events, so feel free to tailor the list for the stat(s) your panel(s) is/are actually using, though just leaving all the events shouldn't have any noticable impact.