Isn’t the best of both worlds what you want? I do a lot of FP and OOP, and both worlds are not perfect. You want to mix them in a way you get the best out of both worlds.
Each has a different mental model and as Evan You said, the host language itself is not suited for a "pure" FP approach and you end up with a leaky abstraction.
As the article states, function closures are how classes are actually implemented in JavaScript so rather than mash the two together, it would seem a more cohesive mental model to simply use a class.
If you step back and look at the broader landscape of UI across desktop (Windows, Mac, Linux), devices (iOS, Android), and web: how many libraries and toolkits are FP and how many are OOP in their abstraction when it comes to managing components and object instances?
If you love OOP, then use Angular. It’s OOP all the way! But you will probably regret using it…
There are also a lot of UI frameworks that are completely functional. Take your pick. (ReScript would be the most obvious choice for a react developer)
But for a good reason the hybrid FP/OOP framework React on JS/TS is one of the most popular.
Classes are in fact "special functions", and just as you can define function expressions and function declarations, a class can be defined in two ways: a class expression or a class declaration.
The difference is that React functional components are effectively "parroting" FP and half-in (stateless components) and half-out (hooks). Solid, Preact, Vue are all-out.
F# has full support for programming with objects in .NET, including classes, interfaces, access modifiers, abstract classes, and so on. For more complicated functional code, such as functions that must be context-aware, objects can easily encapsulate contextual information in ways that functions cannot.
Classes represent the fundamental description of .NET object types; the class is the primary type concept that supports object-oriented programming in F#.
F# has full support for objects, which are useful when you need to blend data and functionality.
The underlying CIL representation of a lambda expression is an object; the functional side of .NET (whether C# or F#) is syntactic sugar on top of an OOP runtime.
As is often the case in CS, there are no definitions for plenty of concepts. FP is simply “programming with functions”. Most languages are multi-paradigm, and in my book any language that has lambdas is already functional - but it is a spectrum. Java has ways to express functional programs, but it is of course much less functional than, Haskell - which itself is also not 100% pure FP.
No, C# has plenty of features making functional programming possible, so it is definitely on the spectrum of FP languages.
Let’s go at it from the other direction - is Haskell functional? Because it has unsafe pointer access and unsafe IO, so it can pretty much express every C# program as well, right?
It literally says on the box that it's not a functional language and it's clear that the actual underlying CIL is class based. If you still want to call that FP, then by all means. But then so is C# since you can do nearly exactly the same things in C#.