I would not do any calculation in React. All should be comming from the backend service. If you ditch React, you are ditching business logic. This is a violation of the thin client definition.
By no means in the article am I suggesting that you should put most of your domain business logic in the client side. This is actually a contrived example of how the Shotgun Surgery can happen within a codebase and how the Strategy Pattern helps to solve it. In a frontend application, you will have a lot of application logic regardless, so the Shotgun Surgery is bound to happen if you're not mindful.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I would not do any calculation in React. All should be comming from the backend service. If you ditch React, you are ditching business logic. This is a violation of the thin client definition.
By no means in the article am I suggesting that you should put most of your domain business logic in the client side. This is actually a contrived example of how the Shotgun Surgery can happen within a codebase and how the Strategy Pattern helps to solve it. In a frontend application, you will have a lot of application logic regardless, so the Shotgun Surgery is bound to happen if you're not mindful.