I recently asked how to use Three.js with React, and “React Three Fiber (R3F)” was recommended. So I am learning R3F.
My understanding of R3F is that it is an architecture that renders Three.js scenes as Views. I would like to create objects that inherit Object3D and execute imperative code like normal OOP, but it doesn’t seem feasible as far as I have learned.
If I want to achieve this, I need to construct a scene graph with OOP apart from R3F in the Model (State) , but such a configuration seems to violate the DRY principle.
Am I misunderstanding something fundamental? I am a little confused. Or is R3F not suitable for complex applications (like Game)?
You can make games, but react is a paradigm higher than oop. It uses functional programming via the component paradigm. Oop is fundamentally flawed if you wanted to use it for app structure, but either way, you can use your class constructs if you wanted to, react is just JavaScript in the end and wouldn’t prevent you from using any of its features.