3 ms·
> React isn't really object-oriented. I don't do web development but I've read react API docs and user guides. Objects calling other objects is optional for O
by Const-me 8y ago
> React isn't really object-oriented.
I don't do web development but I've read react API docs and user guides.
Objects calling other objects is optional for OOP, I never saw a definition that requires them to do. OOP is about code and data organization.
Objects and methods are everywhere in react. Some are very complex.
Just because it uses a few lambdas doesn't mean it's not OOP.
For reference, here's now a non-OOP GUI library may look like: http://behindthepixels.io/IMGUI/ http://behindthepixels.io/IMGUI/ As you see not only it's hard to use, it doesn't scale.
Like it or not, OOP is the only way to deal with complex state invented so far. Even in functional languages: https://medium.com/@gaperton/let-me-start-from-the-less-obvious-thing-7f49e87a45ca https://medium.com/@gaperton/let-me-start-from-the-less-obvi... And modern rich GUIs have very complex state.
- hcarvalhoalves 8y ago> Objects calling other objects is optional for OOP, I never saw a definition that requires them to do. OOP is about code and data organization. Smalltalk, which is the prototypical OO language, does the exact opposite of everything you said (all computations happen by message passing and all members are public).
- Const-me 8y ago> does the exact opposite of everything you said No it doesn’t. > all computations happen by message passing I did not say message passing is required to be not present, I said it’s optional. > and all members are public I did not say anything about encapsulation. I said OO is about organization of code and data. If you have classes with properties and methods, it’s OOP.