Thursday, October 1, 2026
Dr Sam Kamperis FIMA MBCS
Senior Lecturer at Oxford Brookes University.
Organiser of the Year 12 Masterclasses in Oxfordshire.
I’m a mathematician, I teach on the courses in Mathematics, Data Analytics and Computer Science.
PhD in Algorithmic Graph Theory
I make computers draw triangles.
Ten weeks, starting tomorrow: Thursday 8 October
The event handler updates both the JavaScript value and the button text.
Call the state setter to update the value; React renders the button again.
$state marks count as reactive, so changing it updates the button.
Runes are special functions understood by the Svelte compiler. They tell Svelte how values participate in reactivity.
$state makes a value reactive$derived calculates a value from state$effect synchronizes state with an external system$derived: calculate from stateThe derived value stays in sync as count changes.
$effect: synchronize with the outside worldUse an effect for an external system, such as the browser tab title. Prefer $derived for values calculated from state.
In all three, the counter is state. The frameworks differ in how changes reach the page.
Thank you! Any questions?

Week 0