Your React vs Svelte example (this with Chart.js library usage) is not fair. It is something you would say: how to make it wrong in React and how to make it right in Svelte. There is another option: how to make it right in React - and it would be using useRef hook. In that case React example would be almost indentical to Svelte code with just some minor syntactic differences.