I’ve written this sort of thing in both. Personally, I find the “make your view a function of your state” approach to be much easier to reason about and more maintainable. Obviously, not if the only thing your site does is this one feature. But as soon as your site becomes non-trivial, I prefer the functional / React approach.