I'm building an app with React and Flask. React is installed via "create react-app" (yarn). As I don't want to overload the server, I wonder if it is "better" to write math calculus on the React code or on the python server.
This is a basic example: I want to calculate a percentage. I'm getting data from an external API, then send it to React and do the math with a function in javascript on a React components. What exactly do happens? is the function executed on the client? is it executed with typescipt on the node server?
On a final note, would it be lighter to execute that function with the python server or not? (i'm not going into what language is better, it could be any kind of serverside language, i'm trying to determine what exactly is happening on the server and on the client)