4 ms·
React is not a UI library itself -- the actual UI stuff is delegated to the DOM. It is more like a library on top a UI library, that manages the state->represen
by kaba0 3y ago
React is not a UI library itself -- the actual UI stuff is delegated to the DOM. It is more like a library on top a UI library, that manages the state->representation flow (where reactive FP is indeed a good choice).
- ithkuil 3y agoAnd in case it wasn't clear let's say it explicitly: the DOM is pretty much an object oriented model (the O stands for object)
- mostlylurks 3y agoYes, but the fact that react uses the DOM is because that is what the very restricted platform gives you out of the box, and opting for other options would have several disadvantages that are purely the result of those other options not being directly provided by the platform itself. A reactive UI library (like react) could very easily be implemented on top of other UI paradigms as well, including decidedly non-OOP ones. There's nothing special about object oriented UI systems that motivates reactive UI libraries to use them except for the fact that that's what the underlying platform provides because that was what was in fashion when the platform was taking shape.