A
A
Andrey Okhotnikov2019-05-31 21:18:51
OOP
Andrey Okhotnikov, 2019-05-31 21:18:51

Object Oriented and Functional Programming in React?

Is it good practice to mix OOP and FP in a project. I plan to implement the project in the following way - all UI elements, i.e. components should be executed in a functional style using hooks, and all business logic should be taken out separately and implemented through OOP.
Is this the norm? Are there any examples of similar projects?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Robur, 2019-05-31
@tsepen

Can. Any approach that results in clean and well-maintained code is fine. There are many options for how to do this, mixing OOP and functionality in itself does not lead to bad code.
Another question - why do you need to do exactly as you wrote. If you have an answer to it - no problem.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question